roles/vmhost: Enable KSM
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.
This commit is contained in:
12
roles/vmhost/files/ksm.service
Normal file
12
roles/vmhost/files/ksm.service
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user