Difference between revisions of "Huge Page Support"
From Xen
Rcpavlicek (talk | contribs) (Created page with "#format rst #language en ================= Huge Page Support ================= .. contents:: Huge Pages ========== * Huge pages is also known as superpages in FreeBSD, and lar…") |
Rcpavlicek (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | == Huge Pages == |
||
− | #format rst |
||
− | #language en |
||
− | ================= |
||
− | Huge Page Support |
||
− | ================= |
||
+ | * Huge pages are also known as superpages in FreeBSD, and large pages in Microsoft Windows terminology. |
||
− | .. contents:: |
||
− | |||
− | Huge Pages |
||
− | ========== |
||
− | |||
− | * Huge pages is also known as superpages in FreeBSD, and large pages in |
||
− | Microsoft Windows terminology. |
||
* Newer AMD64 processors can use 1GB pages in long mode. |
* Newer AMD64 processors can use 1GB pages in long mode. |
||
− | * Linux has supported huge pages on several architectures since the 2.6 series |
+ | * Linux has supported huge pages on several architectures since the 2.6 series via the hugetlbfs filesystem. |
− | via the hugetlbfs filesystem. |
||
− | * Xen supports allocating huge pages for guest. |
+ | * Xen Project supports allocating huge pages for guest. The hypervisor itself doesn't use huge pages. |
− | Use huge pages in Xen |
+ | == Use huge pages in Xen Project == |
− | ===================== |
||
* 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). |
||
Line 54: | Line 42: | ||
========= |
========= |
||
+ | * Huge Pages: http://en.wikipedia.org/wiki/Page_%28computer_memory%29#Huge_pages |
||
− | * `Huge Pages`_. |
||
− | * |
+ | * Linux Huge Pages: http://linux-mm.org/HugePages |
* https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt |
* https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt |
||
− | |||
− | .. _Huge Pages: http://en.wikipedia.org/wiki/Page_%28computer_memory%29#Huge_pages |
||
− | .. _Linux Huge Pages: http://linux-mm.org/HugePages |
Revision as of 02:38, 1 May 2015
Huge Pages
- Huge pages are also known as superpages in FreeBSD, and large pages in Microsoft Windows terminology.
- 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 guest. The hypervisor itself doesn't use huge pages.
Use huge pages in Xen Project
- Specify the hypervisor boot command line flag `allowsuperpage` (it was called `allowhugepage` before).
- Create the VM with option `superpages = 1`.
Note:
1. This option is for PV guest only; it has no effect to HVM guest. 2. 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`.
- 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
Reference