I think this is Proxmox VE 5 bug.
On version 4, KSM automatically active and start sharing when reach 80% of RAM.
# systemctl status ksmtuned
Unit ksmtuned.service could not be found.
#
# apt-get install ksm*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'ksm-control-daemon' for glob 'ksm*'
Note, selecting 'ksmtuned' for glob 'ksm*'
Recommended packages:
qemu-kvm
The following NEW packages will be installed:
ksm-control-daemon ksmtuned
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 12.6 kB of archives.
After this operation, 68.6 kB of additional disk space will be used.
Get:1 http://download.proxmox.com/debian/pve stretch/pve-no-subscription amd64 ksm-control-daemon all 1.2-2 [5,286 B]
Get:2 http://debian.mirrors.ovh.net/debian stretch/main amd64 ksmtuned amd64 4.20150325+b1 [7,286 B]
Fetched 12.6 kB in 0s (44.9 kB/s)
Selecting previously unselected package ksm-control-daemon.
(Reading database ... 45941 files and directories currently installed.)
Preparing to unpack .../ksm-control-daemon_1.2-2_all.deb ...
Unpacking ksm-control-daemon (1.2-2) ...
Selecting previously unselected package ksmtuned.
Preparing to unpack .../ksmtuned_4.20150325+b1_amd64.deb ...
Unpacking ksmtuned (4.20150325+b1) ...
dpkg: error processing archive /var/cache/apt/archives/ksmtuned_4.20150325+b1_amd64.deb (--unpack):
trying to overwrite '/etc/ksmtuned.conf', which is also in package ksm-control-daemon 1.2-2
Errors were encountered while processing:
/var/cache/apt/archives/ksmtuned_4.20150325+b1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
#
# systemctl status ksmtuned
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
Loaded: loaded (/lib/systemd/system/ksmtuned.service; disabled; vendor preset: enabled)
Active: inactive (dead)
#
On version 4, KSM automatically active and start sharing when reach 80% of RAM.
# systemctl status ksmtuned
Unit ksmtuned.service could not be found.
#
# apt-get install ksm*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'ksm-control-daemon' for glob 'ksm*'
Note, selecting 'ksmtuned' for glob 'ksm*'
Recommended packages:
qemu-kvm
The following NEW packages will be installed:
ksm-control-daemon ksmtuned
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 12.6 kB of archives.
After this operation, 68.6 kB of additional disk space will be used.
Get:1 http://download.proxmox.com/debian/pve stretch/pve-no-subscription amd64 ksm-control-daemon all 1.2-2 [5,286 B]
Get:2 http://debian.mirrors.ovh.net/debian stretch/main amd64 ksmtuned amd64 4.20150325+b1 [7,286 B]
Fetched 12.6 kB in 0s (44.9 kB/s)
Selecting previously unselected package ksm-control-daemon.
(Reading database ... 45941 files and directories currently installed.)
Preparing to unpack .../ksm-control-daemon_1.2-2_all.deb ...
Unpacking ksm-control-daemon (1.2-2) ...
Selecting previously unselected package ksmtuned.
Preparing to unpack .../ksmtuned_4.20150325+b1_amd64.deb ...
Unpacking ksmtuned (4.20150325+b1) ...
dpkg: error processing archive /var/cache/apt/archives/ksmtuned_4.20150325+b1_amd64.deb (--unpack):
trying to overwrite '/etc/ksmtuned.conf', which is also in package ksm-control-daemon 1.2-2
Errors were encountered while processing:
/var/cache/apt/archives/ksmtuned_4.20150325+b1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
#
# systemctl status ksmtuned
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
Loaded: loaded (/lib/systemd/system/ksmtuned.service; disabled; vendor preset: enabled)
Active: inactive (dead)
#