nova libvirt driver needs to check qemu support for NUMA & hugepages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Chris Friesen |
Bug Description
In the trunk (kilo) nova libvirt code there are a numberr of places where we assume that qemu can provide NUMA-related functionality that was only introduced in a very recent version (2.1). If we try to use this code with older qemu it triggers an exception and fails to boot the instance.
In some cases, we can get partial NUMA support by removing some of the more advanced functionality (per-numa-node pinning, per-numa-node hugepages). This would arguably be the best solution.
At the very least, we should introduce a QEMU version check and fail cleanly with a proper error code rather than with cryptic errors that are complicated to resolve.
Known affected areas:
virt.libvirt.
--the "page" subelement of the "hugepages" element is not supported by earlier qemu versions
virt.libvirt.
--the "memnode" subelement of the "numatune" element is not supported by earlier qemu versions
Commenting out the code that configures these elements allows NUMA to work (with somewhat reduced functionality) on an older qemu version, or a newer one without NUMA support (like Ubuntu 14.10 at the time of writing this).
I think we should add a qemu version test against 2.1 and use that to determine whether or not to support the more advanced NUMA capabilities. If Ubuntu doesn't fix their qemu in 14.10 then we might even want to add some kind of runtime capabilities test to check whether qemu was built with numa support.
description: | updated |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: libvirt |
Changed in nova: | |
assignee: | nobody → Chris Friesen (cbf123) |
tags: | removed: kilo-rc-potential |
Changed in nova: | |
milestone: | none → liberty-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | liberty-1 → 12.0.0 |
> Commenting out the code that configures these elements
> allows NUMA to work (with somewhat reduced functionality)
> on an older qemu version, or a newer one without NUMA support
> (like Ubuntu 14.10 at the time of writing this).
No, it really doesn't work correctly. Removing the 'pages' element means we cannot ensure the VM is using the page size that we requested. Removing the 'memnode' element results in the VM memory nodes not having correct host node affinity. Not only will this result in worse performance, but will lead to incorrect schedular decisions because its view of what resources are allocated / in use will no longer match reality in any way.