This commit adds a systemd unit to enable the Kernel Same-page Merging daemon on VM hosts. This allows much greater virtual machine density, especially when many VMs are running the same guest OS.
13 lines
258 B
Desktop File
13 lines
258 B
Desktop File
# vim: set ft=dosini :
|
|
[Unit]
|
|
Description=Kernel Same-Page Merging
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/bin/sh -c "echo 1 > /sys/kernel/mm/ksm/run"
|
|
ExecStop=/bin/sh -c "echo 0 > /sys/kernel/mm/ksm/run"
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|