Strange cpuinfo, how many cores does these physical cpu has?












3














At the end of this post is my /proc/cpuinfo.



I know the Physical cpu number is 2



grep 'physical id' /proc/cpuinfo|sort|uniq|wc -l
2


But how many cores does each cpu have?



The 'cpu cores' shows it has 16 cores.



But use this command it shows there are only 8 cores totally.



grep 'core id' /proc/cpuinfo    
core id : 16
core id : 0
core id : 17
core id : 1
core id : 25
core id : 9
core id : 26
core id : 10


Displays the number of sibling CPUs on the same physical CPU for architectures which use hyper-threading. It's 16 on my machine. But there are 4 for physical 0 cpu, and 4 on physical 1 cpu. I really confused.



Can anybody help me?



Below is my /proc/cpuinfo



processor   : 0
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 1
siblings : 16
core id : 16
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4803.77
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 0
siblings : 16
core id : 0
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.22
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 1
siblings : 16
core id : 17
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.13
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 0
siblings : 16
core id : 1
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.21
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 1
siblings : 16
core id : 25
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.14
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 0
siblings : 16
core id : 9
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.19
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 1
siblings : 16
core id : 26
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.13
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 12
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.191
cache size : 256 KB
physical id : 0
siblings : 16
core id : 10
cpu cores : 16
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
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 lm pni monitor ds_cpl est tm2 cx16 xtpr
bogomips : 4800.20
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:









share|improve this question













migrated from stackoverflow.com Jan 14 '12 at 8:02


This question came from our site for professional and enthusiast programmers.




















    3














    At the end of this post is my /proc/cpuinfo.



    I know the Physical cpu number is 2



    grep 'physical id' /proc/cpuinfo|sort|uniq|wc -l
    2


    But how many cores does each cpu have?



    The 'cpu cores' shows it has 16 cores.



    But use this command it shows there are only 8 cores totally.



    grep 'core id' /proc/cpuinfo    
    core id : 16
    core id : 0
    core id : 17
    core id : 1
    core id : 25
    core id : 9
    core id : 26
    core id : 10


    Displays the number of sibling CPUs on the same physical CPU for architectures which use hyper-threading. It's 16 on my machine. But there are 4 for physical 0 cpu, and 4 on physical 1 cpu. I really confused.



    Can anybody help me?



    Below is my /proc/cpuinfo



    processor   : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 1
    siblings : 16
    core id : 16
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4803.77
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 1
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 0
    siblings : 16
    core id : 0
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.22
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 2
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 1
    siblings : 16
    core id : 17
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.13
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 3
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 0
    siblings : 16
    core id : 1
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.21
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 4
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 1
    siblings : 16
    core id : 25
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.14
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 5
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 0
    siblings : 16
    core id : 9
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.19
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 6
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 1
    siblings : 16
    core id : 26
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.13
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:

    processor : 7
    vendor_id : GenuineIntel
    cpu family : 6
    model : 12
    model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
    stepping : 2
    cpu MHz : 2400.191
    cache size : 256 KB
    physical id : 0
    siblings : 16
    core id : 10
    cpu cores : 16
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    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 lm pni monitor ds_cpl est tm2 cx16 xtpr
    bogomips : 4800.20
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    power management:









    share|improve this question













    migrated from stackoverflow.com Jan 14 '12 at 8:02


    This question came from our site for professional and enthusiast programmers.


















      3












      3








      3







      At the end of this post is my /proc/cpuinfo.



      I know the Physical cpu number is 2



      grep 'physical id' /proc/cpuinfo|sort|uniq|wc -l
      2


      But how many cores does each cpu have?



      The 'cpu cores' shows it has 16 cores.



      But use this command it shows there are only 8 cores totally.



      grep 'core id' /proc/cpuinfo    
      core id : 16
      core id : 0
      core id : 17
      core id : 1
      core id : 25
      core id : 9
      core id : 26
      core id : 10


      Displays the number of sibling CPUs on the same physical CPU for architectures which use hyper-threading. It's 16 on my machine. But there are 4 for physical 0 cpu, and 4 on physical 1 cpu. I really confused.



      Can anybody help me?



      Below is my /proc/cpuinfo



      processor   : 0
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 16
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4803.77
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 1
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 0
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.22
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 2
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 17
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.13
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 3
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 1
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.21
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 4
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 25
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.14
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 5
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 9
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.19
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 6
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 26
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.13
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 7
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 10
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.20
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:









      share|improve this question













      At the end of this post is my /proc/cpuinfo.



      I know the Physical cpu number is 2



      grep 'physical id' /proc/cpuinfo|sort|uniq|wc -l
      2


      But how many cores does each cpu have?



      The 'cpu cores' shows it has 16 cores.



      But use this command it shows there are only 8 cores totally.



      grep 'core id' /proc/cpuinfo    
      core id : 16
      core id : 0
      core id : 17
      core id : 1
      core id : 25
      core id : 9
      core id : 26
      core id : 10


      Displays the number of sibling CPUs on the same physical CPU for architectures which use hyper-threading. It's 16 on my machine. But there are 4 for physical 0 cpu, and 4 on physical 1 cpu. I really confused.



      Can anybody help me?



      Below is my /proc/cpuinfo



      processor   : 0
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 16
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4803.77
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 1
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 0
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.22
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 2
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 17
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.13
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 3
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 1
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.21
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 4
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 25
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.14
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 5
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 9
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.19
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 6
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 1
      siblings : 16
      core id : 26
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.13
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:

      processor : 7
      vendor_id : GenuineIntel
      cpu family : 6
      model : 12
      model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
      stepping : 2
      cpu MHz : 2400.191
      cache size : 256 KB
      physical id : 0
      siblings : 16
      core id : 10
      cpu cores : 16
      fpu : yes
      fpu_exception : yes
      cpuid level : 11
      wp : yes
      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 lm pni monitor ds_cpl est tm2 cx16 xtpr
      bogomips : 4800.20
      clflush size : 64
      cache_alignment : 64
      address sizes : 40 bits physical, 48 bits virtual
      power management:






      linux cpu cpu-usage






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 14 '12 at 7:27







      xiaoming











      migrated from stackoverflow.com Jan 14 '12 at 8:02


      This question came from our site for professional and enthusiast programmers.






      migrated from stackoverflow.com Jan 14 '12 at 8:02


      This question came from our site for professional and enthusiast programmers.
























          6 Answers
          6






          active

          oldest

          votes


















          8














          As per Intels' specs for the processor, it's a quad-core CPU (4 distinct cores), each of which is hyperthreading enabled, which makes it appear as an octo-core.



          Given that it's a Xeon, you could quite easily have a dual-socket motherboard, which means there's 2 separate chips, each of which has 4 cores, each of which can run two threads, so effectively appears to the OS as a 16-core machine.






          share|improve this answer





















          • Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
            – aqua
            Jan 14 '12 at 7:33










          • @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
            – xiaoming
            Jan 14 '12 at 7:55










          • @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
            – Marc B
            Jan 14 '12 at 7:56










          • @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
            – xiaoming
            Jan 14 '12 at 8:00



















          3














          Here is a function that I use to check the CPU information.



          function CORES(){

          local -i SOCKETS=$(grep -w "physical id" /proc/cpuinfo | sort -u | wc -l)
          [ "${SOCKETS}" -eq 0 ] && SOCKETS="1"
          local -i CORES=$(grep -w "core id" /proc/cpuinfo | sort -u | wc -l)
          [ "${CORES}" -eq 0 ] && CORES="1"
          local -r MODEL=$(grep -w "model name" /proc/cpuinfo | sort -u | awk -F: '{print $2}')
          local -ir THREADS=$(grep -w "processor" /proc/cpuinfo | sort -u | wc -l)
          local -ir TOTAL_CORES=$(echo $((${SOCKETS}*${CORES})))
          local -ir THREADS_PER_CORE=$(echo $((${THREADS}/${TOTAL_CORES})))

          echo -e "ModelNamet: " $MODEL
          echo -e "Socketstt: " $SOCKETS
          echo -e "Cores/Sockett: " $CORES
          echo -e "Threads/Coret: " $THREADS_PER_CORE
          echo -e "TotalCorest: " $TOTAL_CORES
          echo -e "TotalThreadst: " $THREADS

          }


          There are three main components to this:




          1. Number of Physical CPUs ('physical id')

          2. Total number of Cores per Physical CPU ('core id')

          3. Total number of Threads per core per physical CPU ('processor')


          The 'model name' is just for informational purposes...



          The only bug with it is if the 'physical id' does not exist in /proc/cpuinfo, then it throws this error (which I have yet to get around to fixing...):



          $ CORES
          -bash: 2/0: division by 0 (error token is "0")
          ModelName : Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
          Sockets : 0
          Cores/Socket : 0
          Threads/Core : 0
          TotalCores : 0
          TotalThreads : 2


          edit: fixed.



          Hope that helps!



          EDIT:
          Here is an example of one that has 'physical id' present:



          ModelName       :  Intel(R) Xeon(R) CPU X3470 @ 2.93GHz
          Sockets : 2
          Cores/Socket : 1
          Threads/Core : 1
          TotalCores : 2
          TotalThreads : 2


          And another



          ModelName       :  Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
          Sockets : 2
          Cores/Socket : 2
          Threads/Core : 1
          TotalCores : 4
          TotalThreads : 4


          EDIT 2: A big one!



          ModelName       :  Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
          Sockets : 2
          Cores/Socket : 6
          Threads/Core : 2
          TotalCores : 12
          TotalThreads : 24


          EDIT: The OP's /proc/cpuinfo results



          $ CORES
          ModelName : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
          Sockets : 2
          Cores/Socket : 8
          Threads/Core : 0
          TotalCores : 16
          TotalThreads : 8


          This indicates that you have Hyper Threading disabled somewhere (likely in the bios), which is why you have 0 threads per core. In this case TotalThreads = Cores/Socket. This means you have 8 cores per socket that are not Hyper Threaded.






          share|improve this answer























          • Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
            – Attie
            Mar 7 '18 at 17:16










          • @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
            – Hickory420
            Mar 8 '18 at 9:19










          • But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
            – Attie
            Mar 8 '18 at 10:23










          • Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
            – Hickory420
            Mar 8 '18 at 23:43





















          2














          It seems to me like /proc/cpuinfo is only showing part of your real physical CPU configuration.



          Some fields may indicate that your system has 2 CPU sockets, each of which has 16 physical cores :





          • physical id goes from 0 to 1, so there would be 2 CPU sockets


          • siblings states that you have 16 logical cores per CPU socket


          • cpu cores is also 16, which I interpret as the number of physical cores for the CPU specified in physical id. As to this point, I would say that the CPU does not support HyperThreading, but...


          According to the spec of Intel E5620 chip, each chip has 4 physical cores, each of which have 2 logical cores thanks to HyperThreading.



          That leads me to the conclusion that, from the point of view of your operating system, you only have partial access to the CPU ressources. I would suggest that you are running from a virtualized environment.



          Let's see below my /proc/cpuinfo on a virtual machine hosted on a two-CPU Intel E5430-based server (2 CPU sockets, 4 physical cores, no hyperthreading). The operating system only sees core#0 from CPU#0 and core#0 from CPU#1.



          processor   : 0
          vendor_id : GenuineIntel
          cpu family : 6
          model : 23
          model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
          stepping : 10
          cpu MHz : 2659.998
          cache size : 6144 KB
          physical id : 0
          siblings : 4
          core id : 0
          cpu cores : 4
          apicid : 0
          initial apicid : 0
          fpu : yes
          fpu_exception : yes
          cpuid level : 13
          wp : yes
          flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
          bogomips : 5319.99
          clflush size : 64
          cache_alignment : 64
          address sizes : 38 bits physical, 48 bits virtual
          power management:

          processor : 1
          vendor_id : GenuineIntel
          cpu family : 6
          model : 23
          model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
          stepping : 10
          cpu MHz : 2659.998
          cache size : 6144 KB
          physical id : 1
          siblings : 4
          core id : 0
          cpu cores : 4
          apicid : 4
          initial apicid : 4
          fpu : yes
          fpu_exception : yes
          cpuid level : 13
          wp : yes
          flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
          bogomips : 5319.78
          clflush size : 64
          cache_alignment : 64
          address sizes : 38 bits physical, 48 bits virtual
          power management:





          share|improve this answer





























            1














            You can parse the /proc/cpuinfo so it is more useful:



            paste <(cat /proc/cpuinfo | grep "core id") <(cat /proc/cpuinfo | grep "processor") | sed 's/[[:blank:]]/ /g'



            On my machine I see:

            core id : 0 processor : 0
            core id : 1 processor : 1
            core id : 2 processor : 2
            core id : 3 processor : 3
            core id : 0 processor : 4
            core id : 1 processor : 5
            core id : 2 processor : 6
            core id : 3 processor : 7



            So 4 cores each with two threads






            share|improve this answer





















            • Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
              – Attie
              Mar 7 '18 at 17:24



















            1














            "core id" is not necessarily sequential. Here is a grep from a dual socket 12-core with threading (so 48 "cores") G5118. Note the missing core ids:



            [qqs43472@cs05r-sc-serv-01 ~]$ cat /proc/cpuinfo  | grep "core id"
            core id : 0
            core id : 1
            core id : 2
            core id : 3
            core id : 4
            core id : 5
            core id : 8
            core id : 9
            core id : 10
            core id : 11
            core id : 12
            core id : 13
            core id : 0
            core id : 1
            core id : 2
            core id : 3
            core id : 4
            core id : 5
            core id : 8
            core id : 9
            core id : 10
            core id : 11
            core id : 12
            core id : 13
            core id : 0
            core id : 1
            core id : 2
            core id : 3
            core id : 4
            core id : 5
            core id : 8
            core id : 9
            core id : 10
            core id : 11
            core id : 12
            core id : 13
            core id : 0
            core id : 1
            core id : 2
            core id : 3
            core id : 4
            core id : 5
            core id : 8
            core id : 9
            core id : 10
            core id : 11
            core id : 12
            core id : 13





            share|improve this answer





















            • The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
              – Scott
              Jun 13 '18 at 14:28



















            0














            That's Hyperthreading, which allows a single core to run two threads more-or-less in parallel. More-or-less depends on what instructions each thread is using.






            share|improve this answer





















            • How could I know the how many cores on a physical cpu?
              – xiaoming
              Jan 14 '12 at 7:59










            • Google the model name which is this case is E5620.
              – Brian
              Jul 29 '12 at 11:22











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f378273%2fstrange-cpuinfo-how-many-cores-does-these-physical-cpu-has%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown
























            6 Answers
            6






            active

            oldest

            votes








            6 Answers
            6






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            8














            As per Intels' specs for the processor, it's a quad-core CPU (4 distinct cores), each of which is hyperthreading enabled, which makes it appear as an octo-core.



            Given that it's a Xeon, you could quite easily have a dual-socket motherboard, which means there's 2 separate chips, each of which has 4 cores, each of which can run two threads, so effectively appears to the OS as a 16-core machine.






            share|improve this answer





















            • Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
              – aqua
              Jan 14 '12 at 7:33










            • @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
              – xiaoming
              Jan 14 '12 at 7:55










            • @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
              – Marc B
              Jan 14 '12 at 7:56










            • @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
              – xiaoming
              Jan 14 '12 at 8:00
















            8














            As per Intels' specs for the processor, it's a quad-core CPU (4 distinct cores), each of which is hyperthreading enabled, which makes it appear as an octo-core.



            Given that it's a Xeon, you could quite easily have a dual-socket motherboard, which means there's 2 separate chips, each of which has 4 cores, each of which can run two threads, so effectively appears to the OS as a 16-core machine.






            share|improve this answer





















            • Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
              – aqua
              Jan 14 '12 at 7:33










            • @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
              – xiaoming
              Jan 14 '12 at 7:55










            • @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
              – Marc B
              Jan 14 '12 at 7:56










            • @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
              – xiaoming
              Jan 14 '12 at 8:00














            8












            8








            8






            As per Intels' specs for the processor, it's a quad-core CPU (4 distinct cores), each of which is hyperthreading enabled, which makes it appear as an octo-core.



            Given that it's a Xeon, you could quite easily have a dual-socket motherboard, which means there's 2 separate chips, each of which has 4 cores, each of which can run two threads, so effectively appears to the OS as a 16-core machine.






            share|improve this answer












            As per Intels' specs for the processor, it's a quad-core CPU (4 distinct cores), each of which is hyperthreading enabled, which makes it appear as an octo-core.



            Given that it's a Xeon, you could quite easily have a dual-socket motherboard, which means there's 2 separate chips, each of which has 4 cores, each of which can run two threads, so effectively appears to the OS as a 16-core machine.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 14 '12 at 7:30







            Marc B



















            • Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
              – aqua
              Jan 14 '12 at 7:33










            • @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
              – xiaoming
              Jan 14 '12 at 7:55










            • @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
              – Marc B
              Jan 14 '12 at 7:56










            • @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
              – xiaoming
              Jan 14 '12 at 8:00


















            • Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
              – aqua
              Jan 14 '12 at 7:33










            • @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
              – xiaoming
              Jan 14 '12 at 7:55










            • @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
              – Marc B
              Jan 14 '12 at 7:56










            • @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
              – xiaoming
              Jan 14 '12 at 8:00
















            Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
            – aqua
            Jan 14 '12 at 7:33




            Yep this would do it. 2 CPUs, 4 cores each. Hyperthreading makes it as if each core counts as two, so 2 * 4 * 2 = 16 processors.
            – aqua
            Jan 14 '12 at 7:33












            @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
            – xiaoming
            Jan 14 '12 at 7:55




            @auqa What does the 'cpu cores' mean? Is it the physical cores or logical cores? I think the cpu cores mean how many physical cores on a single cpu socket? And what does the 'siblings' means?
            – xiaoming
            Jan 14 '12 at 7:55












            @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
            – Marc B
            Jan 14 '12 at 7:56




            @xiaoming: that's been blurred these days by hyperthreading and whatnot. Depends on which marketing people you talk to, and as well which licensing people. Someone like oracle would count your machine as a 16core device and force you buy 16 licenses for oracle. Others might require only 2 licenses because that's how many sockets your machine has.
            – Marc B
            Jan 14 '12 at 7:56












            @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
            – xiaoming
            Jan 14 '12 at 8:00




            @Marc B how could I know each cpu is 4 cores? Which parameters should i use? In lots of documents they say hte 'cpu cores' is the cores on the physical cpu
            – xiaoming
            Jan 14 '12 at 8:00













            3














            Here is a function that I use to check the CPU information.



            function CORES(){

            local -i SOCKETS=$(grep -w "physical id" /proc/cpuinfo | sort -u | wc -l)
            [ "${SOCKETS}" -eq 0 ] && SOCKETS="1"
            local -i CORES=$(grep -w "core id" /proc/cpuinfo | sort -u | wc -l)
            [ "${CORES}" -eq 0 ] && CORES="1"
            local -r MODEL=$(grep -w "model name" /proc/cpuinfo | sort -u | awk -F: '{print $2}')
            local -ir THREADS=$(grep -w "processor" /proc/cpuinfo | sort -u | wc -l)
            local -ir TOTAL_CORES=$(echo $((${SOCKETS}*${CORES})))
            local -ir THREADS_PER_CORE=$(echo $((${THREADS}/${TOTAL_CORES})))

            echo -e "ModelNamet: " $MODEL
            echo -e "Socketstt: " $SOCKETS
            echo -e "Cores/Sockett: " $CORES
            echo -e "Threads/Coret: " $THREADS_PER_CORE
            echo -e "TotalCorest: " $TOTAL_CORES
            echo -e "TotalThreadst: " $THREADS

            }


            There are three main components to this:




            1. Number of Physical CPUs ('physical id')

            2. Total number of Cores per Physical CPU ('core id')

            3. Total number of Threads per core per physical CPU ('processor')


            The 'model name' is just for informational purposes...



            The only bug with it is if the 'physical id' does not exist in /proc/cpuinfo, then it throws this error (which I have yet to get around to fixing...):



            $ CORES
            -bash: 2/0: division by 0 (error token is "0")
            ModelName : Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
            Sockets : 0
            Cores/Socket : 0
            Threads/Core : 0
            TotalCores : 0
            TotalThreads : 2


            edit: fixed.



            Hope that helps!



            EDIT:
            Here is an example of one that has 'physical id' present:



            ModelName       :  Intel(R) Xeon(R) CPU X3470 @ 2.93GHz
            Sockets : 2
            Cores/Socket : 1
            Threads/Core : 1
            TotalCores : 2
            TotalThreads : 2


            And another



            ModelName       :  Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
            Sockets : 2
            Cores/Socket : 2
            Threads/Core : 1
            TotalCores : 4
            TotalThreads : 4


            EDIT 2: A big one!



            ModelName       :  Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
            Sockets : 2
            Cores/Socket : 6
            Threads/Core : 2
            TotalCores : 12
            TotalThreads : 24


            EDIT: The OP's /proc/cpuinfo results



            $ CORES
            ModelName : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
            Sockets : 2
            Cores/Socket : 8
            Threads/Core : 0
            TotalCores : 16
            TotalThreads : 8


            This indicates that you have Hyper Threading disabled somewhere (likely in the bios), which is why you have 0 threads per core. In this case TotalThreads = Cores/Socket. This means you have 8 cores per socket that are not Hyper Threaded.






            share|improve this answer























            • Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
              – Attie
              Mar 7 '18 at 17:16










            • @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
              – Hickory420
              Mar 8 '18 at 9:19










            • But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
              – Attie
              Mar 8 '18 at 10:23










            • Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
              – Hickory420
              Mar 8 '18 at 23:43


















            3














            Here is a function that I use to check the CPU information.



            function CORES(){

            local -i SOCKETS=$(grep -w "physical id" /proc/cpuinfo | sort -u | wc -l)
            [ "${SOCKETS}" -eq 0 ] && SOCKETS="1"
            local -i CORES=$(grep -w "core id" /proc/cpuinfo | sort -u | wc -l)
            [ "${CORES}" -eq 0 ] && CORES="1"
            local -r MODEL=$(grep -w "model name" /proc/cpuinfo | sort -u | awk -F: '{print $2}')
            local -ir THREADS=$(grep -w "processor" /proc/cpuinfo | sort -u | wc -l)
            local -ir TOTAL_CORES=$(echo $((${SOCKETS}*${CORES})))
            local -ir THREADS_PER_CORE=$(echo $((${THREADS}/${TOTAL_CORES})))

            echo -e "ModelNamet: " $MODEL
            echo -e "Socketstt: " $SOCKETS
            echo -e "Cores/Sockett: " $CORES
            echo -e "Threads/Coret: " $THREADS_PER_CORE
            echo -e "TotalCorest: " $TOTAL_CORES
            echo -e "TotalThreadst: " $THREADS

            }


            There are three main components to this:




            1. Number of Physical CPUs ('physical id')

            2. Total number of Cores per Physical CPU ('core id')

            3. Total number of Threads per core per physical CPU ('processor')


            The 'model name' is just for informational purposes...



            The only bug with it is if the 'physical id' does not exist in /proc/cpuinfo, then it throws this error (which I have yet to get around to fixing...):



            $ CORES
            -bash: 2/0: division by 0 (error token is "0")
            ModelName : Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
            Sockets : 0
            Cores/Socket : 0
            Threads/Core : 0
            TotalCores : 0
            TotalThreads : 2


            edit: fixed.



            Hope that helps!



            EDIT:
            Here is an example of one that has 'physical id' present:



            ModelName       :  Intel(R) Xeon(R) CPU X3470 @ 2.93GHz
            Sockets : 2
            Cores/Socket : 1
            Threads/Core : 1
            TotalCores : 2
            TotalThreads : 2


            And another



            ModelName       :  Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
            Sockets : 2
            Cores/Socket : 2
            Threads/Core : 1
            TotalCores : 4
            TotalThreads : 4


            EDIT 2: A big one!



            ModelName       :  Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
            Sockets : 2
            Cores/Socket : 6
            Threads/Core : 2
            TotalCores : 12
            TotalThreads : 24


            EDIT: The OP's /proc/cpuinfo results



            $ CORES
            ModelName : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
            Sockets : 2
            Cores/Socket : 8
            Threads/Core : 0
            TotalCores : 16
            TotalThreads : 8


            This indicates that you have Hyper Threading disabled somewhere (likely in the bios), which is why you have 0 threads per core. In this case TotalThreads = Cores/Socket. This means you have 8 cores per socket that are not Hyper Threaded.






            share|improve this answer























            • Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
              – Attie
              Mar 7 '18 at 17:16










            • @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
              – Hickory420
              Mar 8 '18 at 9:19










            • But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
              – Attie
              Mar 8 '18 at 10:23










            • Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
              – Hickory420
              Mar 8 '18 at 23:43
















            3












            3








            3






            Here is a function that I use to check the CPU information.



            function CORES(){

            local -i SOCKETS=$(grep -w "physical id" /proc/cpuinfo | sort -u | wc -l)
            [ "${SOCKETS}" -eq 0 ] && SOCKETS="1"
            local -i CORES=$(grep -w "core id" /proc/cpuinfo | sort -u | wc -l)
            [ "${CORES}" -eq 0 ] && CORES="1"
            local -r MODEL=$(grep -w "model name" /proc/cpuinfo | sort -u | awk -F: '{print $2}')
            local -ir THREADS=$(grep -w "processor" /proc/cpuinfo | sort -u | wc -l)
            local -ir TOTAL_CORES=$(echo $((${SOCKETS}*${CORES})))
            local -ir THREADS_PER_CORE=$(echo $((${THREADS}/${TOTAL_CORES})))

            echo -e "ModelNamet: " $MODEL
            echo -e "Socketstt: " $SOCKETS
            echo -e "Cores/Sockett: " $CORES
            echo -e "Threads/Coret: " $THREADS_PER_CORE
            echo -e "TotalCorest: " $TOTAL_CORES
            echo -e "TotalThreadst: " $THREADS

            }


            There are three main components to this:




            1. Number of Physical CPUs ('physical id')

            2. Total number of Cores per Physical CPU ('core id')

            3. Total number of Threads per core per physical CPU ('processor')


            The 'model name' is just for informational purposes...



            The only bug with it is if the 'physical id' does not exist in /proc/cpuinfo, then it throws this error (which I have yet to get around to fixing...):



            $ CORES
            -bash: 2/0: division by 0 (error token is "0")
            ModelName : Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
            Sockets : 0
            Cores/Socket : 0
            Threads/Core : 0
            TotalCores : 0
            TotalThreads : 2


            edit: fixed.



            Hope that helps!



            EDIT:
            Here is an example of one that has 'physical id' present:



            ModelName       :  Intel(R) Xeon(R) CPU X3470 @ 2.93GHz
            Sockets : 2
            Cores/Socket : 1
            Threads/Core : 1
            TotalCores : 2
            TotalThreads : 2


            And another



            ModelName       :  Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
            Sockets : 2
            Cores/Socket : 2
            Threads/Core : 1
            TotalCores : 4
            TotalThreads : 4


            EDIT 2: A big one!



            ModelName       :  Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
            Sockets : 2
            Cores/Socket : 6
            Threads/Core : 2
            TotalCores : 12
            TotalThreads : 24


            EDIT: The OP's /proc/cpuinfo results



            $ CORES
            ModelName : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
            Sockets : 2
            Cores/Socket : 8
            Threads/Core : 0
            TotalCores : 16
            TotalThreads : 8


            This indicates that you have Hyper Threading disabled somewhere (likely in the bios), which is why you have 0 threads per core. In this case TotalThreads = Cores/Socket. This means you have 8 cores per socket that are not Hyper Threaded.






            share|improve this answer














            Here is a function that I use to check the CPU information.



            function CORES(){

            local -i SOCKETS=$(grep -w "physical id" /proc/cpuinfo | sort -u | wc -l)
            [ "${SOCKETS}" -eq 0 ] && SOCKETS="1"
            local -i CORES=$(grep -w "core id" /proc/cpuinfo | sort -u | wc -l)
            [ "${CORES}" -eq 0 ] && CORES="1"
            local -r MODEL=$(grep -w "model name" /proc/cpuinfo | sort -u | awk -F: '{print $2}')
            local -ir THREADS=$(grep -w "processor" /proc/cpuinfo | sort -u | wc -l)
            local -ir TOTAL_CORES=$(echo $((${SOCKETS}*${CORES})))
            local -ir THREADS_PER_CORE=$(echo $((${THREADS}/${TOTAL_CORES})))

            echo -e "ModelNamet: " $MODEL
            echo -e "Socketstt: " $SOCKETS
            echo -e "Cores/Sockett: " $CORES
            echo -e "Threads/Coret: " $THREADS_PER_CORE
            echo -e "TotalCorest: " $TOTAL_CORES
            echo -e "TotalThreadst: " $THREADS

            }


            There are three main components to this:




            1. Number of Physical CPUs ('physical id')

            2. Total number of Cores per Physical CPU ('core id')

            3. Total number of Threads per core per physical CPU ('processor')


            The 'model name' is just for informational purposes...



            The only bug with it is if the 'physical id' does not exist in /proc/cpuinfo, then it throws this error (which I have yet to get around to fixing...):



            $ CORES
            -bash: 2/0: division by 0 (error token is "0")
            ModelName : Intel(R) Xeon(R) CPU X5560 @ 2.80GHz
            Sockets : 0
            Cores/Socket : 0
            Threads/Core : 0
            TotalCores : 0
            TotalThreads : 2


            edit: fixed.



            Hope that helps!



            EDIT:
            Here is an example of one that has 'physical id' present:



            ModelName       :  Intel(R) Xeon(R) CPU X3470 @ 2.93GHz
            Sockets : 2
            Cores/Socket : 1
            Threads/Core : 1
            TotalCores : 2
            TotalThreads : 2


            And another



            ModelName       :  Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
            Sockets : 2
            Cores/Socket : 2
            Threads/Core : 1
            TotalCores : 4
            TotalThreads : 4


            EDIT 2: A big one!



            ModelName       :  Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
            Sockets : 2
            Cores/Socket : 6
            Threads/Core : 2
            TotalCores : 12
            TotalThreads : 24


            EDIT: The OP's /proc/cpuinfo results



            $ CORES
            ModelName : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
            Sockets : 2
            Cores/Socket : 8
            Threads/Core : 0
            TotalCores : 16
            TotalThreads : 8


            This indicates that you have Hyper Threading disabled somewhere (likely in the bios), which is why you have 0 threads per core. In this case TotalThreads = Cores/Socket. This means you have 8 cores per socket that are not Hyper Threaded.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 13 '18 at 4:51

























            answered Jun 25 '15 at 8:30









            Hickory420

            314




            314












            • Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
              – Attie
              Mar 7 '18 at 17:16










            • @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
              – Hickory420
              Mar 8 '18 at 9:19










            • But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
              – Attie
              Mar 8 '18 at 10:23










            • Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
              – Hickory420
              Mar 8 '18 at 23:43




















            • Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
              – Attie
              Mar 7 '18 at 17:16










            • @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
              – Hickory420
              Mar 8 '18 at 9:19










            • But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
              – Attie
              Mar 8 '18 at 10:23










            • Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
              – Hickory420
              Mar 8 '18 at 23:43


















            Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
            – Attie
            Mar 7 '18 at 17:16




            Your outputs are wrong... X3470, E5520 and E5620 are all 4x core with HT
            – Attie
            Mar 7 '18 at 17:16












            @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
            – Hickory420
            Mar 8 '18 at 9:19




            @Attie Actually they're not because on some servers we have HT disabled (as per the vendor's requirement). I guess I should have mentioned that :P
            – Hickory420
            Mar 8 '18 at 9:19












            But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
            – Attie
            Mar 8 '18 at 10:23




            But (for example), your output lists E5520 as a 2 core without hyperthreading... unless you've disable hyperthreading and disabled two cores, that's wrong.
            – Attie
            Mar 8 '18 at 10:23












            Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
            – Hickory420
            Mar 8 '18 at 23:43






            Hmm... You raise a valid point. Unfortunately, I do not have access to these servers anymore, so I cannot confirm this. If you have access to some servers (or even just your own pc), run the function and confirm the output. If the function I have posted is not correctly calculating the numbers, I would like to fix that. That being said, it is possible that thread + cores have been disabled on the E5520. The vendor was (is) very picky about that... Cheers.
            – Hickory420
            Mar 8 '18 at 23:43













            2














            It seems to me like /proc/cpuinfo is only showing part of your real physical CPU configuration.



            Some fields may indicate that your system has 2 CPU sockets, each of which has 16 physical cores :





            • physical id goes from 0 to 1, so there would be 2 CPU sockets


            • siblings states that you have 16 logical cores per CPU socket


            • cpu cores is also 16, which I interpret as the number of physical cores for the CPU specified in physical id. As to this point, I would say that the CPU does not support HyperThreading, but...


            According to the spec of Intel E5620 chip, each chip has 4 physical cores, each of which have 2 logical cores thanks to HyperThreading.



            That leads me to the conclusion that, from the point of view of your operating system, you only have partial access to the CPU ressources. I would suggest that you are running from a virtualized environment.



            Let's see below my /proc/cpuinfo on a virtual machine hosted on a two-CPU Intel E5430-based server (2 CPU sockets, 4 physical cores, no hyperthreading). The operating system only sees core#0 from CPU#0 and core#0 from CPU#1.



            processor   : 0
            vendor_id : GenuineIntel
            cpu family : 6
            model : 23
            model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
            stepping : 10
            cpu MHz : 2659.998
            cache size : 6144 KB
            physical id : 0
            siblings : 4
            core id : 0
            cpu cores : 4
            apicid : 0
            initial apicid : 0
            fpu : yes
            fpu_exception : yes
            cpuid level : 13
            wp : yes
            flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
            bogomips : 5319.99
            clflush size : 64
            cache_alignment : 64
            address sizes : 38 bits physical, 48 bits virtual
            power management:

            processor : 1
            vendor_id : GenuineIntel
            cpu family : 6
            model : 23
            model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
            stepping : 10
            cpu MHz : 2659.998
            cache size : 6144 KB
            physical id : 1
            siblings : 4
            core id : 0
            cpu cores : 4
            apicid : 4
            initial apicid : 4
            fpu : yes
            fpu_exception : yes
            cpuid level : 13
            wp : yes
            flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
            bogomips : 5319.78
            clflush size : 64
            cache_alignment : 64
            address sizes : 38 bits physical, 48 bits virtual
            power management:





            share|improve this answer


























              2














              It seems to me like /proc/cpuinfo is only showing part of your real physical CPU configuration.



              Some fields may indicate that your system has 2 CPU sockets, each of which has 16 physical cores :





              • physical id goes from 0 to 1, so there would be 2 CPU sockets


              • siblings states that you have 16 logical cores per CPU socket


              • cpu cores is also 16, which I interpret as the number of physical cores for the CPU specified in physical id. As to this point, I would say that the CPU does not support HyperThreading, but...


              According to the spec of Intel E5620 chip, each chip has 4 physical cores, each of which have 2 logical cores thanks to HyperThreading.



              That leads me to the conclusion that, from the point of view of your operating system, you only have partial access to the CPU ressources. I would suggest that you are running from a virtualized environment.



              Let's see below my /proc/cpuinfo on a virtual machine hosted on a two-CPU Intel E5430-based server (2 CPU sockets, 4 physical cores, no hyperthreading). The operating system only sees core#0 from CPU#0 and core#0 from CPU#1.



              processor   : 0
              vendor_id : GenuineIntel
              cpu family : 6
              model : 23
              model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
              stepping : 10
              cpu MHz : 2659.998
              cache size : 6144 KB
              physical id : 0
              siblings : 4
              core id : 0
              cpu cores : 4
              apicid : 0
              initial apicid : 0
              fpu : yes
              fpu_exception : yes
              cpuid level : 13
              wp : yes
              flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
              bogomips : 5319.99
              clflush size : 64
              cache_alignment : 64
              address sizes : 38 bits physical, 48 bits virtual
              power management:

              processor : 1
              vendor_id : GenuineIntel
              cpu family : 6
              model : 23
              model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
              stepping : 10
              cpu MHz : 2659.998
              cache size : 6144 KB
              physical id : 1
              siblings : 4
              core id : 0
              cpu cores : 4
              apicid : 4
              initial apicid : 4
              fpu : yes
              fpu_exception : yes
              cpuid level : 13
              wp : yes
              flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
              bogomips : 5319.78
              clflush size : 64
              cache_alignment : 64
              address sizes : 38 bits physical, 48 bits virtual
              power management:





              share|improve this answer
























                2












                2








                2






                It seems to me like /proc/cpuinfo is only showing part of your real physical CPU configuration.



                Some fields may indicate that your system has 2 CPU sockets, each of which has 16 physical cores :





                • physical id goes from 0 to 1, so there would be 2 CPU sockets


                • siblings states that you have 16 logical cores per CPU socket


                • cpu cores is also 16, which I interpret as the number of physical cores for the CPU specified in physical id. As to this point, I would say that the CPU does not support HyperThreading, but...


                According to the spec of Intel E5620 chip, each chip has 4 physical cores, each of which have 2 logical cores thanks to HyperThreading.



                That leads me to the conclusion that, from the point of view of your operating system, you only have partial access to the CPU ressources. I would suggest that you are running from a virtualized environment.



                Let's see below my /proc/cpuinfo on a virtual machine hosted on a two-CPU Intel E5430-based server (2 CPU sockets, 4 physical cores, no hyperthreading). The operating system only sees core#0 from CPU#0 and core#0 from CPU#1.



                processor   : 0
                vendor_id : GenuineIntel
                cpu family : 6
                model : 23
                model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                stepping : 10
                cpu MHz : 2659.998
                cache size : 6144 KB
                physical id : 0
                siblings : 4
                core id : 0
                cpu cores : 4
                apicid : 0
                initial apicid : 0
                fpu : yes
                fpu_exception : yes
                cpuid level : 13
                wp : yes
                flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
                bogomips : 5319.99
                clflush size : 64
                cache_alignment : 64
                address sizes : 38 bits physical, 48 bits virtual
                power management:

                processor : 1
                vendor_id : GenuineIntel
                cpu family : 6
                model : 23
                model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                stepping : 10
                cpu MHz : 2659.998
                cache size : 6144 KB
                physical id : 1
                siblings : 4
                core id : 0
                cpu cores : 4
                apicid : 4
                initial apicid : 4
                fpu : yes
                fpu_exception : yes
                cpuid level : 13
                wp : yes
                flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
                bogomips : 5319.78
                clflush size : 64
                cache_alignment : 64
                address sizes : 38 bits physical, 48 bits virtual
                power management:





                share|improve this answer












                It seems to me like /proc/cpuinfo is only showing part of your real physical CPU configuration.



                Some fields may indicate that your system has 2 CPU sockets, each of which has 16 physical cores :





                • physical id goes from 0 to 1, so there would be 2 CPU sockets


                • siblings states that you have 16 logical cores per CPU socket


                • cpu cores is also 16, which I interpret as the number of physical cores for the CPU specified in physical id. As to this point, I would say that the CPU does not support HyperThreading, but...


                According to the spec of Intel E5620 chip, each chip has 4 physical cores, each of which have 2 logical cores thanks to HyperThreading.



                That leads me to the conclusion that, from the point of view of your operating system, you only have partial access to the CPU ressources. I would suggest that you are running from a virtualized environment.



                Let's see below my /proc/cpuinfo on a virtual machine hosted on a two-CPU Intel E5430-based server (2 CPU sockets, 4 physical cores, no hyperthreading). The operating system only sees core#0 from CPU#0 and core#0 from CPU#1.



                processor   : 0
                vendor_id : GenuineIntel
                cpu family : 6
                model : 23
                model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                stepping : 10
                cpu MHz : 2659.998
                cache size : 6144 KB
                physical id : 0
                siblings : 4
                core id : 0
                cpu cores : 4
                apicid : 0
                initial apicid : 0
                fpu : yes
                fpu_exception : yes
                cpuid level : 13
                wp : yes
                flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
                bogomips : 5319.99
                clflush size : 64
                cache_alignment : 64
                address sizes : 38 bits physical, 48 bits virtual
                power management:

                processor : 1
                vendor_id : GenuineIntel
                cpu family : 6
                model : 23
                model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                stepping : 10
                cpu MHz : 2659.998
                cache size : 6144 KB
                physical id : 1
                siblings : 4
                core id : 0
                cpu cores : 4
                apicid : 4
                initial apicid : 4
                fpu : yes
                fpu_exception : yes
                cpuid level : 13
                wp : yes
                flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
                bogomips : 5319.78
                clflush size : 64
                cache_alignment : 64
                address sizes : 38 bits physical, 48 bits virtual
                power management:






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 15 '13 at 14:18









                Mickaël Le Baillif

                20123




                20123























                    1














                    You can parse the /proc/cpuinfo so it is more useful:



                    paste <(cat /proc/cpuinfo | grep "core id") <(cat /proc/cpuinfo | grep "processor") | sed 's/[[:blank:]]/ /g'



                    On my machine I see:

                    core id : 0 processor : 0
                    core id : 1 processor : 1
                    core id : 2 processor : 2
                    core id : 3 processor : 3
                    core id : 0 processor : 4
                    core id : 1 processor : 5
                    core id : 2 processor : 6
                    core id : 3 processor : 7



                    So 4 cores each with two threads






                    share|improve this answer





















                    • Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
                      – Attie
                      Mar 7 '18 at 17:24
















                    1














                    You can parse the /proc/cpuinfo so it is more useful:



                    paste <(cat /proc/cpuinfo | grep "core id") <(cat /proc/cpuinfo | grep "processor") | sed 's/[[:blank:]]/ /g'



                    On my machine I see:

                    core id : 0 processor : 0
                    core id : 1 processor : 1
                    core id : 2 processor : 2
                    core id : 3 processor : 3
                    core id : 0 processor : 4
                    core id : 1 processor : 5
                    core id : 2 processor : 6
                    core id : 3 processor : 7



                    So 4 cores each with two threads






                    share|improve this answer





















                    • Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
                      – Attie
                      Mar 7 '18 at 17:24














                    1












                    1








                    1






                    You can parse the /proc/cpuinfo so it is more useful:



                    paste <(cat /proc/cpuinfo | grep "core id") <(cat /proc/cpuinfo | grep "processor") | sed 's/[[:blank:]]/ /g'



                    On my machine I see:

                    core id : 0 processor : 0
                    core id : 1 processor : 1
                    core id : 2 processor : 2
                    core id : 3 processor : 3
                    core id : 0 processor : 4
                    core id : 1 processor : 5
                    core id : 2 processor : 6
                    core id : 3 processor : 7



                    So 4 cores each with two threads






                    share|improve this answer












                    You can parse the /proc/cpuinfo so it is more useful:



                    paste <(cat /proc/cpuinfo | grep "core id") <(cat /proc/cpuinfo | grep "processor") | sed 's/[[:blank:]]/ /g'



                    On my machine I see:

                    core id : 0 processor : 0
                    core id : 1 processor : 1
                    core id : 2 processor : 2
                    core id : 3 processor : 3
                    core id : 0 processor : 4
                    core id : 1 processor : 5
                    core id : 2 processor : 6
                    core id : 3 processor : 7



                    So 4 cores each with two threads







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 7 '18 at 17:09









                    Andy

                    211




                    211












                    • Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
                      – Attie
                      Mar 7 '18 at 17:24


















                    • Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
                      – Attie
                      Mar 7 '18 at 17:24
















                    Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
                    – Attie
                    Mar 7 '18 at 17:24




                    Include cat /proc/cpuinfo | grep "physical id" for multi-socket systems
                    – Attie
                    Mar 7 '18 at 17:24











                    1














                    "core id" is not necessarily sequential. Here is a grep from a dual socket 12-core with threading (so 48 "cores") G5118. Note the missing core ids:



                    [qqs43472@cs05r-sc-serv-01 ~]$ cat /proc/cpuinfo  | grep "core id"
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13





                    share|improve this answer





















                    • The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
                      – Scott
                      Jun 13 '18 at 14:28
















                    1














                    "core id" is not necessarily sequential. Here is a grep from a dual socket 12-core with threading (so 48 "cores") G5118. Note the missing core ids:



                    [qqs43472@cs05r-sc-serv-01 ~]$ cat /proc/cpuinfo  | grep "core id"
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13





                    share|improve this answer





















                    • The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
                      – Scott
                      Jun 13 '18 at 14:28














                    1












                    1








                    1






                    "core id" is not necessarily sequential. Here is a grep from a dual socket 12-core with threading (so 48 "cores") G5118. Note the missing core ids:



                    [qqs43472@cs05r-sc-serv-01 ~]$ cat /proc/cpuinfo  | grep "core id"
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13





                    share|improve this answer












                    "core id" is not necessarily sequential. Here is a grep from a dual socket 12-core with threading (so 48 "cores") G5118. Note the missing core ids:



                    [qqs43472@cs05r-sc-serv-01 ~]$ cat /proc/cpuinfo  | grep "core id"
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13
                    core id : 0
                    core id : 1
                    core id : 2
                    core id : 3
                    core id : 4
                    core id : 5
                    core id : 8
                    core id : 9
                    core id : 10
                    core id : 11
                    core id : 12
                    core id : 13






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 13 '18 at 13:30









                    Greg Matthews

                    111




                    111












                    • The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
                      – Scott
                      Jun 13 '18 at 14:28


















                    • The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
                      – Scott
                      Jun 13 '18 at 14:28
















                    The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
                    – Scott
                    Jun 13 '18 at 14:28




                    The question makes it obvious that the code IDs are not sequential.  Can you expand on how your post answers the question, and what it contributes that hasn’t already been said in other answers? Please do not respond in comments; edit your answer to make it clearer and more complete.
                    – Scott
                    Jun 13 '18 at 14:28











                    0














                    That's Hyperthreading, which allows a single core to run two threads more-or-less in parallel. More-or-less depends on what instructions each thread is using.






                    share|improve this answer





















                    • How could I know the how many cores on a physical cpu?
                      – xiaoming
                      Jan 14 '12 at 7:59










                    • Google the model name which is this case is E5620.
                      – Brian
                      Jul 29 '12 at 11:22
















                    0














                    That's Hyperthreading, which allows a single core to run two threads more-or-less in parallel. More-or-less depends on what instructions each thread is using.






                    share|improve this answer





















                    • How could I know the how many cores on a physical cpu?
                      – xiaoming
                      Jan 14 '12 at 7:59










                    • Google the model name which is this case is E5620.
                      – Brian
                      Jul 29 '12 at 11:22














                    0












                    0








                    0






                    That's Hyperthreading, which allows a single core to run two threads more-or-less in parallel. More-or-less depends on what instructions each thread is using.






                    share|improve this answer












                    That's Hyperthreading, which allows a single core to run two threads more-or-less in parallel. More-or-less depends on what instructions each thread is using.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 14 '12 at 7:29









                    Ben Voigt

                    5,47712953




                    5,47712953












                    • How could I know the how many cores on a physical cpu?
                      – xiaoming
                      Jan 14 '12 at 7:59










                    • Google the model name which is this case is E5620.
                      – Brian
                      Jul 29 '12 at 11:22


















                    • How could I know the how many cores on a physical cpu?
                      – xiaoming
                      Jan 14 '12 at 7:59










                    • Google the model name which is this case is E5620.
                      – Brian
                      Jul 29 '12 at 11:22
















                    How could I know the how many cores on a physical cpu?
                    – xiaoming
                    Jan 14 '12 at 7:59




                    How could I know the how many cores on a physical cpu?
                    – xiaoming
                    Jan 14 '12 at 7:59












                    Google the model name which is this case is E5620.
                    – Brian
                    Jul 29 '12 at 11:22




                    Google the model name which is this case is E5620.
                    – Brian
                    Jul 29 '12 at 11:22


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f378273%2fstrange-cpuinfo-how-many-cores-does-these-physical-cpu-has%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    Origin of the phrase “under your belt”?