1

This was only observed in Linux virtual machines. In /proc/cpuinfo, the physical id could be very large, exceeding the number of cpus.

For below example, 4 core systems but the physical id is 13. Also had another virtual machine, only 2 cores, but one physical id is 2.

Anyone has idea how virtual machine defines the linux physical ID?

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
stepping        : 7
microcode       : 1808
cpu MHz         : 2900.040
cache size      : 20480 KB
physical id     : 13
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 13
initial apicid  : 13
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb pln pts dts
bogomips        : 5800.08
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
stepping        : 7
microcode       : 1808
cpu MHz         : 2900.040
cache size      : 20480 KB
physical id     : 13
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 13
initial apicid  : 13
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb pln pts dts
bogomips        : 5800.08
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
stepping        : 7
microcode       : 1808
cpu MHz         : 2900.040
cache size      : 20480 KB
physical id     : 13
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 13
initial apicid  : 13
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb pln pts dts
bogomips        : 5800.08
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
stepping        : 7
microcode       : 1808
cpu MHz         : 2900.040
cache size      : 20480 KB
physical id     : 13
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 13
initial apicid  : 13
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes hypervisor lahf_lm arat epb pln pts dts
bogomips        : 5800.08
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:
2
  • This previous questions seems to cover all the topics asked here: superuser.com/questions/388115/…
    – Daniel
    Feb 24, 2015 at 21:33
  • afraid not. I just want to know why phsical id can go to 13.
    – Xin
    Feb 25, 2015 at 17:54

1 Answer 1

1

Physical ID is intended to indicate which physical CPU the information pertains to. However since /proc/cpuinfo is mostly extracted from the CPU itself, there is lots of room for confusion.

In particular cores and hyperthreading will confuse the physical id. On most systems I have encountered the pattern of physical Id being corehyperthreads. That is, core 1 will have a physical id of 1, core two will have a physical id of 1(number of hyperthreads).

In your case, I concede my math doesn't quite support the observation that your CPU has 8 cores and 16 hyperthreads.

Try:

grep "physical id" /proc/cpuinfo

What are the values of "physical id" ... we would expect some progression as each core is given a new 'id'.

This summary of values may or may not be useful/accurate.

1
  • Yes, it only have 4 cores. But physical id goes beyond 13. That
    – Xin
    Mar 4, 2015 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .