Huge Page Support: Difference between revisions
From Xen
Jump to navigationJump to search
Rcpavlicek (talk | contribs) |
Rcpavlicek (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{InfoLeft|This page is new and needs review for accuracy and completeness.}} |
<!--{{InfoLeft|This page is new and needs review for accuracy and completeness.}}--> |
||
== What Are Huge Pages? == |
== What Are Huge Pages? == |
||
Line 9: | Line 9: | ||
* Linux has supported huge pages on several architectures since the 2.6 series via the hugetlbfs filesystem. |
* Linux has supported huge pages on several architectures since the 2.6 series via the hugetlbfs filesystem. |
||
* Xen Project supports allocating huge pages for |
* Xen Project supports allocating huge pages for HVM and PVH guests (PV is *not* supported). The hypervisor itself uses huge pages wherever it can. |
||
== Using Huge Pages == |
== Using Huge Pages == |
||
Line 15: | Line 15: | ||
* Specify the hypervisor boot command line flag `allowsuperpage` (it was called `allowhugepage` before). |
* Specify the hypervisor boot command line flag `allowsuperpage` (it was called `allowhugepage` before). |
||
<!-- The following is old and perhaps Oracle-VM-specific: |
|||
* Create the VM with option `superpages = 1`. |
* Create the VM with option `superpages = 1`. |
||
Line 21: | Line 22: | ||
#This option is for PV guest only; it has no effect to HVM guest. |
#This option is for PV guest only; it has no effect to HVM guest. |
||
#With this option, PV guest `memory` and `maxmem` must be 2M aligned. Otherwise the VM cannot be started. |
#With this option, PV guest `memory` and `maxmem` must be 2M aligned. Otherwise the VM cannot be started. |
||
--> |
|||
* Specify the Linux boot command line flag `balloon_hugepages`. |
* Specify the Linux boot command line flag `balloon_hugepages`. |
Revision as of 13:44, 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 (PV is *not* supported). The hypervisor itself uses huge pages wherever it can.
Using Huge Pages
- Specify the hypervisor boot command line flag `allowsuperpage` (it was called `allowhugepage` before).
- 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
- Wikipedia entry for Huge Pages
- Huge Pages from Linux memory management site
- Huge Page Document from Kernel.org
- And the source document for this page: http://zhigang.org/wiki/XenHugePages