20
edits
Changes
→Enabling memory deduplication in applications
Then (re)start your Percona Server as usual.
== How to check efficiency of KSM ==
To check if KSM is actually reducing memory usage, issue this command on the HN:
[root@HN /]# cat /sys/kernel/mm/KSM/pages_sharing
If the value is greater than 0, you're saving memory. Refer to https://www.kernel.org/doc/Documentation/vm/ksm.txt for more details.
On [https://gist.github.com/wankdanker/1206923 this page] you'll find a simple script which displays the saved RAM amount in MB.
== Tuning ==
On a production machine, you'll want to modify some of the default values. A more sane value for /sys/kernel/mm/KSM/sleep_millisecs is usually between 50 and 250 (YMMV though):
[root@HN ~]# echo 50 > /sys/kernel/mm/ksm/sleep_millisecs:50