<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 5, 2017 at 7:48 AM, Ron Kelley <span dir="ltr"><<a href="mailto:rkelleyrtp@gmail.com" target="_blank">rkelleyrtp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
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.<br>
<br></blockquote><div><br></div><div><br></div><div>Works for me here on a simple test, in 2 privileged containers.</div><div><br></div><div># grep -H '' /sys/kernel/mm/ksm/*</div><div><div>/sys/kernel/mm/ksm/full_scans:4488</div><div>/sys/kernel/mm/ksm/merge_across_nodes:1</div><div>/sys/kernel/mm/ksm/pages_shared:3</div><div>/sys/kernel/mm/ksm/pages_sharing:3</div><div>/sys/kernel/mm/ksm/pages_to_scan:100</div><div>/sys/kernel/mm/ksm/pages_unshared:18</div><div>/sys/kernel/mm/ksm/pages_volatile:0</div><div>/sys/kernel/mm/ksm/run:1</div><div>/sys/kernel/mm/ksm/sleep_millisecs:20</div><div>/sys/kernel/mm/ksm/use_zero_pages:0</div></div><div><br></div><div>- build ksm-wrapper from source</div><div>- patch ksm-wrapper as mentioned on <a href="https://github.com/unbrice/ksm_preload/issues/6">https://github.com/unbrice/ksm_preload/issues/6</a></div><div>- on host, run 'echo 1 > /sys/kernel/mm/ksm/run'<br></div><div>- on container 1 & 2 , run 'ksm-wrapper bash', and the (on both bash prompt) run htop</div><div><br></div><div>pages_shared and pages_sharing will have non-zero value when htop is running on both containers</div><div><br></div><div>-- </div><div>Fajar</div><div><br></div></div></div></div>