Guest CPU does not support 1Gb hugepages with explicit models

Bug #1538565 reported by Tapio Tallgren
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned

Bug Description

The CPU flag pdpe1gb indicates that the CPU model supports 1 GB hugepages - without it, the Linux operating system refuses to allocate 1 GB huge pages (and other things might go wrong if it did).

Not all Intel CPU models support 1 GB huge pages, so the qemu options -cpu Haswell and -cpu Broadwell give you a vCPU that does not have the pdpe1gb flag. This is the correct thing to do, since the VM might be running on a Haswell that does not have 1GB huge pages.

Problem is that Nova flavor extra specs with the libvirt driver for qemu/kvm only allow to define the CPU model, either an explicit model or "host". The host option means that all CPU flags in the host CPU are passed to the vCPU. However, the host option complicates VM migration since the CPU would change after migration.

In conclusion, there is no good way to specify a CPU model that would imply the pdpe1gb flag.

Huge pages are used eg with dpdk. They improve the performance of the VM mainly by reducing tlb size.

Revision history for this message
Tapio Tallgren (tapio-tallgren) wrote :

Similar discussion earlier:

https://review.openstack.org/#/c/168982/

Revision history for this message
Sean Dague (sdague) wrote :

I'm not sure how this boils down into an actionable bug. Can you specify the reproduce scenario and the expected vs. actual result?

Changed in nova:
status: New → Incomplete
Revision history for this message
Tapio Tallgren (tapio-tallgren) wrote :

I have a host that has a Haswell processor and supports 1GB hugepages. I want to launch a VM with CPU model Haswell to support migration to other servers that may have Haswell or later processors. When I launch the VM and look at the CPU flags, it does not have the pdpe1gb flag and therefore does not support 1GB hugepages.

I can specify cpu model as "host" but then I cannot migrate the VM between processor families.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
Revision history for this message
Chris Friesen (cbf123) wrote :

In recent versions of qemu the "Skylake-Server" cpu model has the flag, but any earlier Intel processor models do not.

Changed in nova:
status: Expired → Confirmed
Revision history for this message
Chris Friesen (cbf123) wrote :

There is a spec in review right now to address this: https://review.openstack.org/#/c/534384/

Revision history for this message
Chris Friesen (cbf123) wrote :

The code at https://review.openstack.org/#/c/534384/ has been merged, and should allow the operator to explicitly add the pdpe1gb flag.

Marking as fixed.

Changed in nova:
status: Confirmed → Fix Released
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.