[lxc-users] LXD and Kernel Samepage Merging (KSM)

Ron Kelley rkelleyrtp at gmail.com
Mon Jun 5 02:02:14 UTC 2017


Thanks for the feedback and info.  Seems something is amiss with my setup.

What does your Ubuntu install look like?  I have a standard Ubuntu 16.04 with up-to-date patches and with LXD 2.12.  Guess I need to find the differences between your setup and mine.

Thanks for any help!

-Ron



> On Jun 4, 2017, at 9:58 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> 
> 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
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list