Nova CPU details socket not correct

Bug #1428872 reported by Amol Chobe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

we are using Mirantis 6.0
we are trying to find a physical CPU information from Nova compute host . e are using nova hypervisor-show command.

when i tried running the nova hypervisor-show <compute_node>

its show me correct info cpu_arch , cpu_info_features and cores ... but its show its only one sockets where as we are using 2 CPU .( see details from compute node below)

we are trying to find physical CPU details from Nova-compute host blade ,

Here is what nova shows

root@node-9:~# nova hypervisor-show node-12
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| cpu_info_arch | x86_64 |
| cpu_info_features | ["ssse3", "pge", "avx", "clflush", "sep", "syscall", "vme", "dtes64", "invpcid", "msr", "sse", "xsave", "vmx", "erms", "xtpr", "cmov", "tsc", "smep", "pbe", "est", "pat", "monitor", "smx", "lm", "abm", "nx", "fxsr", "tm", "sse4.1", "pae", "sse4.2", "pclmuldq", "acpi", "fma", "tsc-deadline", "popcnt", "mmx", "osxsave", "cx8", "mce", "mtrr", "rdtscp", "ht", "dca", "lahf_lm", "pdcm", "mca", "pdpe1gb", "apic", "fsgsbase", "f16c", "pse", "ds", "pni", "tm2", "avx2", "aes", "sse2", "ss", "bmi1", "bmi2", "pcid", "de", "fpu", "cx16", "pse36", "ds_cpl", "movbe", "rdrand", "x2apic"] |
| cpu_info_model | SandyBridge |
| cpu_info_topology_cores | 12 |
| cpu_info_topology_sockets | 1 |
| cpu_info_topology_threads 2 |
| cpu_info_vendor | Intel
`

In reality it is 2 CPU as below , here is output from nova-compute host

root@node-16:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 12
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Stepping: 2
CPU MHz: 2500.093
BogoMIPS: 5001.17
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47

Park (jianlonghei)
Changed in nova:
assignee: nobody → Park (jianlonghei)
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Amol,

Since this is an upstream bug, removing MOS.

thanks,
dims

no longer affects: mos
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Park (jianlonghei) wrote :
Download full text (5.0 KiB)

usually, nova takes libvirt as compute driver, so could you help to verify if the libvirt driver output directly?
you could run "virsh nodeinfo" as belows

park@park-ThinkPad-T420:~$ virsh nodeinfo
CPU model: x86_64
CPU(s): 4
CPU frequency: 2601 MHz
CPU socket(s): 1
Core(s) per socket: 2
Thread(s) per core: 2
NUMA cell(s): 1
Memory size: 8056668 KiB

BTW, I could NOT reproduce this issue on my laptop
park@park-ThinkPad-T420:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Stepping: 7
CPU MHz: 800.000
BogoMIPS: 5183.62
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
park@park-ThinkPad-T420:~$ nova hypervisor-show 1
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| cpu_info_arch | x86_64 |
| cpu_info_features | ["ssse3", "pge", "avx", "clflush", "sep", "syscall", "vme", "dtes64", "tsc", ...

Read more...

Revision history for this message
Amol Chobe (amol-chobe) wrote : RE: [Bug 1428872] Re: Nova CPU details socket not correct
Download full text (12.9 KiB)

Thanks ...

The virsh nodeinfo show CPUS(s) as 48 ... so that could be issue ...
Is there any setting in libvirt that I need to change ?

Thx,
Amol

root@node-16:~# virsh nodeinfo
CPU model: x86_64
CPU(s): 48
CPU frequency: 2500 MHz
CPU socket(s): 1
Core(s) per socket: 12
Thread(s) per core: 2
NUMA cell(s): 2
Memory size: 131793936 KiB

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Park
Sent: Monday, March 09, 2015 3:49 AM
To: Amol Chobe
Subject: [Bug 1428872] Re: Nova CPU details socket not correct

usually, nova takes libvirt as compute driver, so could you help to verify if the libvirt driver output directly?
you could run "virsh nodeinfo" as belows

park@park-ThinkPad-T420:~$ virsh nodeinfo
CPU model: x86_64
CPU(s): 4
CPU frequency: 2601 MHz
CPU socket(s): 1
Core(s) per socket: 2
Thread(s) per core: 2
NUMA cell(s): 1
Memory size: 8056668 KiB

BTW, I could NOT reproduce this issue on my laptop park@park-ThinkPad-T420:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Stepping: 7
CPU MHz: 800.000
BogoMIPS: 5183.62
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
park@park-ThinkPad-T420:~$ nova hypervisor-show 1
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------...

Revision history for this message
Park (jianlonghei) wrote :

sorry I am NOT familiar with libvirt neither...

but from your virsh nodeinfo output, nova stays consistant with virsh, so I don't think this is a nova bug...

I am going to close this bug, please feel free to reopen it if any problem

Changed in nova:
status: Confirmed → In Progress
status: In Progress → Invalid
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

I think this is a valid problem. Nova hypervisor show reports:
| cpu_info_topology_cores | 12 |
| cpu_info_topology_sockets | 1 |
| cpu_info_topology_threads 2 |
If you multiple these number together you get 24 cpus on the host, in the other hand virsh nodeinfon reports
CPU(s): 48

This is because the compute host has two NUMA node each with 24 cpus. Current there is no way to determine how many NUMA nodes the hypervisor has from the output of the nova hypervisor-show.

To solve this either the cpu_info_topology_sockets in the hypervisor-show shall contain the value of nr_of_numa_nodes * socket_per_numa_node or the hypervisor-show shall have an extra value that tells the number of NUMA nodes on the host.

Changed in nova:
status: Invalid → New
Revision history for this message
Sujitha (sujitha-neti) wrote :

There are no open reviews for this bug report since a long time.
And it was moved to invalid by last assignee. The bug was moved to New state later.

To signal that to other contributors which might provide patches for
this bug, I'm removing the assignee.

Feel free to add yourself as assignee and push a review for it.

Changed in nova:
assignee: Park (jianlonghei) → nobody
Changed in nova:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.