[Bug 1439280] Re: Libvirt CPU affinity error
Kashyap Chamarthy
kchamart at redhat.com
Thu Apr 9 14:24:14 UTC 2015
Yes, to test CPU pinning/NUMA with libvirt you ought to use Nested KVM.
Please report results after testing with that.
That said, some notes below.
Quoting Dan Berrange from a different review with a complete response on
*why*:
It is fundamentally impossible to test CPU pinning with TCG (aka plain
QEMU) because TCG only has a single thread for all virtual CPUs. As such
there is no mechanism to pin vCPU threads with TCG. Nested KVM is thus
the only possible option for testing any of the NUMA / CPU pinning
stuff. Instructions for nested KVM setup on a KVM host are documented
here
http://docs.openstack.org/developer/nova/devref/testing/libvirt-
numa.html#provisioning-a-virtual-machine-for-testing
>From my testing, a Nova guest booted with a NUMA flavor, will have the
below contextual XML snippets w.r.t vCPU placement:
. . .
<vcpu placement='static'>4</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='0-3'/>
<vcpupin vcpu='1' cpuset='0-3'/>
<vcpupin vcpu='2' cpuset='0-3'/>
<vcpupin vcpu='3' cpuset='0-3'/>
<emulatorpin cpuset='0-3'/>
</cputune>
<numatune>
<memory mode='strict' nodeset='0'/>
<memnode cellid='0' mode='strict' nodeset='0'/>
</numatune>
. . .
<cpu>
<topology sockets='4' cores='1' threads='1'/>
<numa>
<cell id='0' cpus='0-3' memory='1048576' unit='KiB'/>
</numa>
</cpu>
. . .
Here's the working example XMLs from my testing.
Libvirt XML for the guest hypervisor (also called L1), running DevStack
and will host Nova instances which are nested guests:
https://kashyapc.fedorapeople.org/virt/openstack/nova-libvirt-numa-
testing/devstack-vm-libvirt.xml
And, Nova guest XML, booted with a NUMA flavor:
https://kashyapc.fedorapeople.org/virt/openstack/nova-libvirt-numa-
testing/nova-guest-libvirt.xml
** Changed in: nova (Ubuntu)
Status: Confirmed => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/1439280
Title:
Libvirt CPU affinity error
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nova/+bug/1439280/+subscriptions
More information about the Ubuntu-server-bugs
mailing list