Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

KSM (kernel same-page merging)

121 bytes added, 21:40, 20 July 2015
added references and external links sections; minor rewording in intro
KSM is a memory-saving de-duplication feature, added developed by RedHat to Red Hat. It first appeared in the Linux kernel version 2.6.32.
KSM replaces RAM pages of identical content with a single write-protected page, which in turn gets automatically copied to a new one if a process later wants to update its content. This makes the de-duplication mechanism transparent to applications. This strategy is commonly known as COW (''Copy On Write'').
== Caveats ==
The ksmd daemon will take one or two minutes to start deduplicating memory and will require several minutes to reach stable state. During the boot phase your HN could start swapping if you have heavily overcommitted your RAM. You might want to use more aggressive settings (higher <code>pages_to_scan</code>, lower <code>sleep_millisecs</code>) at the beginning, effectively trading CPU utilisation utilization for less chances of disk swapping, and then relax them after 10 mins or so. Another possibility is to place your swap onto an SSD drive. == References == <references/> == External links == * [[wikipedia:Kernel same-page merging]]