Difference between revisions of "Huge Page Support"

From Xen
(Using Huge Pages)
m (Using Huge Pages)
Line 11: Line 11:
 
== Using Huge Pages ==
 
== Using Huge Pages ==
   
* In the Hypervisor: In recent versions, huge page support is enabled by default. Older versions (and custom builds with different defaults) may need to specify the hypervisor boot command line flag "allowsuperpage" (formerly called "allowhugepage").
+
* In the Hypervisor: In recent versions, huge page support is '''enabled by default'''. Older versions (and custom builds with different defaults) may need to specify the hypervisor boot command line flag "allowsuperpage" (formerly called "allowhugepage").
   
 
<!-- The following is old and perhaps Oracle-VM-specific:
 
<!-- The following is old and perhaps Oracle-VM-specific:

Revision as of 14:29, 7 May 2015

What Are Huge Pages?

  • Huge pages are also known as "superpages" in FreeBSD (or "large pages" in the Microsoft Windows world)
  • Newer AMD64 processors can use 1GB pages in long mode.
  • Linux has supported huge pages on several architectures since the 2.6 series via the hugetlbfs filesystem.
  • Xen Project supports allocating huge pages for HVM and PVH guests (use in PV guests is not supported). The hypervisor itself uses huge pages wherever it can.

Using Huge Pages

  • In the Hypervisor: In recent versions, huge page support is enabled by default. Older versions (and custom builds with different defaults) may need to specify the hypervisor boot command line flag "allowsuperpage" (formerly called "allowhugepage").
  • Specify the Linux boot command line flag `balloon_hugepages`.
  • In the guest::
   # echo 20 > /proc/sys/vm/nr_hugepages

   # cat /proc/meminfo
   ...
   AnonHugePages:         0 kB
   HugePages_Total:      20
   HugePages_Free:       20
   HugePages_Rsvd:        0
   HugePages_Surp:        0
   Hugepagesize:       2048 kB
   DirectMap4k:     1056768 kB
   DirectMap2M:           0 kB

References