Bug 530762 - hugetlbfs support doesn't work
hugetlbfs support doesn't work
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-10-24 15:34 EDT by Sven Lankes
Modified: 2009-10-29 13:16 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-10-25 19:27:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sven Lankes 2009-10-24 15:34:22 EDT

contains this checklist to get hugetlbfs to work:

1. mount -t hugetlbfs hugetlbfs /dev/hugepages

  I have done this - /dev/hugepages didn't exist - I created it

2. Reserve some memory for huge pages - sysctl vm.nr_hugepages=516

  Done - I created 600 pages to fit a 1024 MB vm (on amd64):

  (from meminfo):

  HugePages_Total:     600
  HugePages_Free:      600
  HugePages_Rsvd:        0
  HugePages_Surp:        0

3. Run an existing KVM guest with libvirt

  done (I also restarted libvirtd)

4. Confirm the guest has booted correctly


5. Confirm the guest is using hugepages by checking HugePages_Free in /proc/meminfo

  it doesn't - HugePages_Free is still 600

Selinux is disabled, my kvm-commandline:

/usr/bin/qemu-kvm -S -M pc-0.11 -m 1024 -smp 1 -name f11-x86_64 -uuid 61563594-3d8f-17c8-1b87-7d727689a9a0 -monitor unix:/var/lib/libvirt/qemu/f11-x86_64.monitor,server,nowait -boot c -drive file=,if=ide,media=cdrom,index=2 -drive file=/var/lib/libvirt/images/f1164.img,if=virtio,index=0,boot=on -net nic,macaddr=00:16:36:74:aa:8f,vlan=0,model=virtio,name=virtio.0 -net tap,fd=17,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc -vga cirrus
Comment 1 Daniel Berrange 2009-10-25 19:27:50 EDT
Hugepages are not enabled by default for guests, so merely mounting hugetlbfs won't make them be used. You need to add the following to the guest


To enable use of hugepages for RAM allocation.
Comment 2 Mark McLoughlin 2009-10-29 13:16:50 EDT
Sven, thanks for the report - I've added a note to "How to test" section in the wiki

Note You need to log in before you can comment on or make changes to this bug.