[Bug 1623871] Re: Nova hugepage support does not include aarch64
dann frazier
dann.frazier at canonical.com
Fri Sep 30 16:26:46 UTC 2016
@mveenasl asked that I describe my testing process - here it is:
I pushed this change to a PPA:
https://launchpad.net/~ce-hyperscale/+archive/ubuntu/cloud-mitaka
I then deployed OpenStack across a cluster of Cavium ThunderX CRB1s systems
using the current Mitaka Juju charms. I configured the nova-compute charm to pull
packages from this overlay PPA:
openstack-origin: ppa:ce-hyperscale/cloud-mitaka
I logged into each of the 3 nova-compute nodes and created hugepages:
$ echo 4096 | sudo tee /sys/kernel/mm/hugepages/hugepages-
2048kB/nr_hugepages
And restarted libvirt/nova-compute just to be sure they were detected:
$ sudo service libvirt-bin restart; sudo service nova-compute restart
I configured the m1.small flavor type to use hugepages:
$ nova flavor-key m1.small set hw:mem_page_size=2048
I then launched a guest:
$ nova boot --image xenial-uefi --flavor m1.small --nic net-id=0fed1d06-2c7c-48ab-b81b-112af6d362d7 uefi
Then found the corresponding hypervisor node and logged in.
I verified that QEMU was started w/ the appropriate memory-backend
settings:
$ ps -ef | grep qemu
libvirt+ 850307 1 42 16:17 ? 00:00:12 /usr/bin/qemu-system-aarch64 -name instance-00000001 -S -machine virt,accel=kvm,usb=off,gic-version=3 -cpu host -drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/instance-00000001_VARS.fd,if=pflash,format=raw,unit=1 -m 2048 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=2147483648,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0,memdev=ram-node0 [...]
And that the hugepage pool was actually depleted:
$ cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/free_hugepages
3072
And finally, checked the console log to make sure the guest OS actually
booted:
ubuntu at ubuntu:~$ nova console-log uefi | tail -2
[ 196.813164] cloud-init[1242]: Cloud-init v. 0.7.7 finished at Fri, 30 Sep 2016 16:21:21 +0000. Datasource DataSourceEc2. Up 196.73 seconds
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/1623871
Title:
Nova hugepage support does not include aarch64
Status in OpenStack Compute (nova):
In Progress
Status in nova package in Ubuntu:
Triaged
Status in nova source package in Xenial:
Triaged
Bug description:
[Impact]
Although aarch64 supports spawning a vm with hugepages, in nova code, the libvirt driver considers only x86_64 and I686. Both for NUMA and Hugepage support, AARCH64 needs to be added. Due to this bug, vm can not be launched with hugepage using OpenStack on aarch64 servers.
Note: this depends on the fix for LP: #1627926.
[Test Case]
Steps to reproduce:
On an openstack environment running on aarch64:
1. Configure compute to use hugepages.
2. Set mem_page_size="2048" for a flavor
3. Launch a VM using the above flavor.
Expected result:
VM should be launched with hugepages and the libvirt xml should have
<memoryBacking>
<hugepages>
<page size='2048' unit='KiB' nodeset='0'/>
</hugepages>
</memoryBacking>
Actual result:
VM is launched without hugepages.
There are no error logs in nova-scheduler.
[Regression Risk]
Risk is minimized by the fact that this change is just enabling the same code for arm64 that is already enabled for Ubuntu/x86.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1623871/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list