[libvirt] When guest configured for threads, poor VCPU accounting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
Noticed while testing: https:/
I have a host advertising 16 VCPUs (2 sockets, each 8 cores). Each core happens to have 8 threads. (This is on a beefy POWER8 system). With the above blueprint, I can now create a 1 socket, 2 core, 8 thread guest.
All works fine, except that I noticed "Free VCPUS: 0' even though I'm really only using two cores. I'd think I would see 14 free VCPUs in this scenario.
Guest lscpu output:
[root@bare-precise ~]# lscpu
Architecture: ppc64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Big Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Thread(s) per core: 8
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Model: IBM pSeries (emulated by qemu)
L1d cache: 64K
L1i cache: 32K
NUMA node0 CPU(s): 0-15
Resulting tracker
2014-08-12 12:17:18.874 96650 AUDIT nova.compute.
tags: | added: libvirt |
Changed in nova: | |
assignee: | Jon Grimm (jgrimm) → nobody |
Hi Jon:
I have tested your issue, but I can't reproduce it. I use below flavor to create a vm with 3vcpus in a host with 8 vcpus
+------ ------- ------- ------- -+----- ------- ------- ------- ------- ------- ------+ ------- ------- ------- -+----- ------- ------- ------- ------- ------- ------+ DISABLED: disabled | False | EXT-DATA: ephemeral | 0 | 1a07-4aea- bb44-687fc9c6ae 46 | access: is_public | True | ------- ------- ------- -+----- ------- ------- ------- ------- ------- ------+
| Property | Value |
+------
| OS-FLV-
| OS-FLV-
| disk | 1 |
| extra_specs | {"hw:cpu_cores": "1", "hw:cpu_sockets": "3"} |
| id | 4c8ffddf-
| name | m1.tiny |
| os-flavor-
| ram | 512 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 3 |
+------
then , I can see the extra_specs whic I set work to vm: 3,cores= 1,threads= 1 -name instance-00000004 -uuid b7198295- 3667-4abe- b9d4-07fb5e9775 50 -smbios type=1, manufacturer= OpenStack Foundation, product= OpenStack ......
/usr/bin/kvm-spice -S -M pc-1.1 -enable-kvm -m 512 -smp 3,sockets=
In additon, I see below log from nova-compute.log: resource_ tracker [-] Free VCPUS: 5
AUDIT nova.compute.