We help IT Professionals succeed at work.

Number of Logical processors in Linux

ashsysad
ashsysad used Ask the Experts™
on
I have a Redhat AS 4 Linux  server (64 bit) with Hyper-threading enabled. This server has got 8 physical processors with one core each. However the total number of logical Processors are showing as '8'. If hyper-threading is enabled, it suppose to show as '16'. Can you see what is the wrong with this server? Please let me know.

[root@mlck-365-tdb01 nsr]# cat /proc/cpuinfo | grep 'physical id'
physical id     : 16
physical id     : 18
physical id     : 20
physical id     : 22
physical id     : 17
physical id     : 19
physical id     : 21
physical id     : 23
[root@mlck-365-tdb01 nsr]# cat /proc/cpuinfo | grep 'cpu cores'
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
[root@mlck-365-tdb01 nsr]# cat /proc/cpuinfo | grep 'processor' | wc -l
8
[root@mlck-365-tdb01 nsr]# cat /proc/cpuinfo | grep 'processor'
processor       : 0
processor       : 1
processor       : 2
processor       : 3
processor       : 4
processor       : 5
processor       : 6
processor       : 7
[root@mlck-365-tdb01 nsr]# dmidecode -t processor | grep HTT
                HTT (Hyper-threading technology)
[root@mlck-365-tdb01 nsr]# cat /proc/cpuinfo | grep 'ht'
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm pni monitor ds_cpl est tm2 cx16 xtpr popcnt lahf_lm
.
.
.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You have 8 physical CPUs with one core each. So you have 8*1 = 8 logical CPU
Topic Advisor
Most Valuable Expert 2016
Commented:
You cat /proc/cpuinfo | grep 'ht' command shows that your kernel supports hyperthreading.

Here's some more info about multi-processor, multi-core and whether hyperthreading is enabled or not

Author

Commented:
@gerwinjansen,  Yes, this server supports Hyper-threading.  So I should be having be having 16 Logical processors; but I have only 8 logical CPUs.

I myself have written a post on HTT:
http://ashok-linux-tips.blogspot.com/2011/06/best-way-to-check-hyper-threading_25.html

Any idea how can I check if HTT enabled at the BIOS without restarting the server ?
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
What about the siblings in cpuinfo, what does it say?

Author

Commented:
[root@mlck-365-tdb01 ~]#  cat /proc/cpuinfo | grep siblings
siblings        : 1
siblings        : 1
siblings        : 1
siblings        : 1
siblings        : 1
siblings        : 1
siblings        : 1
siblings        : 1
[root@mlck-365-tdb01 ~]#

The cpu cores value matches the siblings value, so is that mean the Server supports HTT but it isn't enabled?  Is reboot the only way to enable the HTT ?

Author

Commented:
[root@mlck-365-tdb01 ~]# dmidecode -t processor
# dmidecode 2.9
SMBIOS 2.6 present.

Handle 0x0400, DMI type 4, 40 bytes
Processor Information
        Socket Designation: CPU1
        Type: Central Processor
        Family: Xeon
        Manufacturer: Intel
        ID: A5 06 01 00 FF FB EB BF
        Signature: Type 0, Family 6, Model 26, Stepping 5
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                DS (Debug store)
                ACPI (ACPI supported)
                MMX (MMX technology supported)
                FXSR (Fast floating-point save and restore)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                SS (Self-snoop)
                HTT (Hyper-threading technology)
                TM (Thermal monitor supported)
                PBE (Pending break enabled)
        Version: Intel(R) Xeon(R) CPU           X5560  @ 2.80GHz
        Voltage: 1.2 V
        External Clock: 6400 MHz
        Max Speed: 3600 MHz
        Current Speed: 2800 MHz
        Status: Populated, Enabled
        Upgrade: <OUT OF SPEC>
        L1 Cache Handle: 0x0700
        L2 Cache Handle: 0x0701
        L3 Cache Handle: 0x0702
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 4
        Core Enabled: 4
        Thread Count: 8
        Characteristics:
                64-bit capable

Handle 0x0401, DMI type 4, 40 bytes
Processor Information
        Socket Designation: CPU2
        Type: Central Processor
        Family: Unknown
        Manufacturer: Intel
        ID: 00 00 00 00 00 00 00 00
        Version: Not Specified
        Voltage: 1.2 V
        External Clock: Unknown
        Max Speed: 3600 MHz
        Current Speed: Unknown
        Status: Unpopulated
        Upgrade: <OUT OF SPEC>
        L1 Cache Handle: 0x0703
        L2 Cache Handle: 0x0704
        L3 Cache Handle: 0x0705
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Characteristics:
                64-bit capable

[root@mlck-365-tdb01 ~]#
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
>> Is reboot the only way to enable the HT?
AFAIK - yes, it's a BIOS setting, disabling one core once HT is enabled is possible, not the other way around. You can schedule this action during the next planned maintenance window. I'm not sure what you gain performance wise with this setting enabled btw.

Author

Commented:
I'm still confused with this information from 'dmidecode -t processor' output.

       Core Count: 4
       Core Enabled: 4
       Thread Count: 8

I don't see this information in CPU2.
  Socket Designation: CPU2

If someone asks how many physical CPUs and Cores on this server, can I say its:
8 Physical CPUs with one core each.

Is that right ?  Please confirm.

Thanks.
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016
Commented:
8 physical CPUs , with one core each is correct. HT is not 'adding' cores, it just enables executing 2 threads 'simultanuously'.

Author

Commented:
Thanks for clarifying me. Have a great day !