It IT/Releases/12/Features/KVM Huge Page Backed Memory

From FedoraProject

< It IT | Releases
Revision as of 12:37, 27 January 2010 by Lewis41 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

KVM Huge Page Backed Memory

Sommario

Enable KVM guests to use huge page backed memory in order to reduce memory consumption and improve performance by reducing CPU cache pressure.

Progettista

Current status

  • Targeted release: Fedora 12
  • Last updated: 2009-09-24
  • Percentage of completion: 100%

An SELinux issue in the kernel still remains, preventing full sVirt protection being applied to huge pages.

Completed

  1. KVM support for huge pages
  2. libvirt patch posted for running guests with -mem-path /dev/hugepages
  3. libvirt patch-v2 posted which detects the host's hugetlbfs mount point automatically.
  4. Identify SELinux issue in the kernel
  5. Get the libvirt patch committed to libvirt-0.7.1

Detailed Description

x86 CPUs usually address memory in 4kB pages, but they also have the ability to use huge pages (4MB on x86_32, 2MB on x86_64 and x86_32 PAE).

By using huge pages for a KVM guest's memory, less memory is used for page tables and TLB misses are reduced, thereby increasing performance.

Using huge pages for guest memory does have a downside, however - you can no longer swap nor balloon guest memory.

In order to use huge pages with KVM, one must do the following:

  1. Mount hugetlbfs to /dev/hugepages - mount -t hugetlbfs hugetlbfs /dev/hugepages
  2. Reserve some memory for huge pages - sysctl vm.nr_hugepages=516
  3. Pass the hugetlbfs path to qemu-kvm - qemu-kvm -mem-path /dev/hugepages

This feature aims to improve allow huge pages to be used with libvirt managed guests.

Benefit to Fedora

Enables Fedora KVM hosts to achieve better performance.

Altre informazioni

Per:

  • Obbiettivi
  • Test Plan
  • Esperienza Utente
  • Dipendenze
  • Progetto corrente
  • Documentazione
  • Note di rilascio
  • Commenti e Discussioni

consultare la pagina originale di questo documento.