encyclopegia.org

Kernel same-page merging

In computing, kernel same-page merging (KSM), also known as kernel shared memory, memory merging, memory deduplication, and page deduplication is a kernel feature that makes it possible for a hypervisor system to share memory pages that have identical contents between multiple processes or virtualized guests.[src] While not directly linked, Kernel-based Virtual Machine (KVM) can use KSM to merge memory pages occupied by virtual machines.[src]

In computing, kernel same-page merging (KSM), also known as kernel shared memory, memory merging, memory deduplication, and page deduplication is a kernel feature that makes it possible for a hypervisor system to share memory pages that have identical contents between multiple processes or virtualized guests.[src] While not directly linked, Kernel-based Virtual Machine (KVM) can use KSM to merge memory pages occupied by virtual machines.[src] ==Deduplication== KSM performs memory deduplication by scanning through main memory for physical pages that have identical content, and identifies the virtual pages that are mapped to those physical pages.[src] It leaves one page unchanged, and re-maps each duplicate page to point to the same physical page, after which it releases the extra physical pages for re-use.[src] It also marks both virtual pages as "copy-on-write" (COW), so that kernel will automatically remap a virtual page back to having its own separate physical page as soon as any process begins to write to it.[src] KSM was originally intended to run more virtual machines on one host by sharing memory between processes as well as virtual machines.[src] An experimental implementation of KSM by Red Hat found that 52 virtual instances of Windows XP with 1 GB of memory, could run on a host computer that had only 16 GB of RAM.[src] Upon its implementation, users found KSM to also be useful for non-virtualized environments in which memory is at a premium.[src] KSM was merged into the Linux kernel mainline in version 2.6.32, which was released on December 3, 2009.[src] To be effective, the operating system kernel must find identical memory pages held by different processes.[src] The kernel also needs to predict whether the pages are likely to update infrequently enough that the merging would be an efficient use of processor resources.[src] A concern is that although memory usage is reduced, CPU usage is increased, thus negating potential increases in performance.[src] ==Security risks== Security is also a concern: Allows circumvention of address space layout randomization (ASLR) Exposes information via timing attacks Allows contamination of cryptographic resources in other virtualized guests via the memory row hammer attack ==See also== Data deduplication – Reduction of storage requirement by sharing duplicate files Single-instance storage ==References== ==External links== Linux kernel documentation Fedora KSM page Kernel-based virtual machine site - KSM[src]

15 sentences · 15 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Kernel same-page merging." encyclopegia.org, 2024, https://encyclopegia.org/wiki/kernel-same-page-merging. Accessed 26 November 2026.

Chicago

"Kernel same-page merging." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/kernel-same-page-merging.

APA

encyclopegia.org. (2024). Kernel same-page merging. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/kernel-same-page-merging

Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON

Claims

PredicateValueSource
release date2009-12-03Wikipedia

Related articles

same-sex marriage

stub · references available

Same-sex marriage in the Netherlands

stub · references available

Same-sex marriage in Massachusetts

stub · references available

Same-sex marriage in New York

stub · references available

Bettie Page

stub · references available

Coverdale and Page

stub · references available

The Front Page

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1224011516 · 0.5 · snapshot enwiki-001224011516

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.