[lxc-users] LXD and Kernel Samepage Merging (KSM)
Fajar A. Nugraha
list at fajar.net
Mon Jun 5 01:58:25 UTC 2017
On Mon, Jun 5, 2017 at 7:48 AM, Ron Kelley <rkelleyrtp at gmail.com> wrote:
>
> As for the openvz link; I read that a few times but I don’t get any
> positive results using those methods. This leads me to believe (a) LXD
> does not support KSM or (b) the applications are not registering w/the KSM
> part of the kernel.
>
>
Works for me here on a simple test, in 2 privileged containers.
# grep -H '' /sys/kernel/mm/ksm/*
/sys/kernel/mm/ksm/full_scans:4488
/sys/kernel/mm/ksm/merge_across_nodes:1
/sys/kernel/mm/ksm/pages_shared:3
/sys/kernel/mm/ksm/pages_sharing:3
/sys/kernel/mm/ksm/pages_to_scan:100
/sys/kernel/mm/ksm/pages_unshared:18
/sys/kernel/mm/ksm/pages_volatile:0
/sys/kernel/mm/ksm/run:1
/sys/kernel/mm/ksm/sleep_millisecs:20
/sys/kernel/mm/ksm/use_zero_pages:0
- build ksm-wrapper from source
- patch ksm-wrapper as mentioned on
https://github.com/unbrice/ksm_preload/issues/6
- on host, run 'echo 1 > /sys/kernel/mm/ksm/run'
- on container 1 & 2 , run 'ksm-wrapper bash', and the (on both bash
prompt) run htop
pages_shared and pages_sharing will have non-zero value when htop is
running on both containers
--
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170605/f2ad8e64/attachment.html>
More information about the lxc-users
mailing list