Saturday, November 20, 2010

ubuntu - ksm vs apparmor

Lately I was supposed to do some ksm tests to check if it can be used on a multi-user terminal server to reduce the amount of ram consumed by multiple eclipse instances. I started with ubuntu Lucid. I enabled ksm (echo "1" > /sys/kernel/mm/ksm/run). I also launched multiple eclipse and firefox instances. Then I checked /sys/kernel/mm/ksm/pages_shared which showed 0 all the time, even when the machine started swapping.

Then I upgraded to Maverick and also had no luck with ksm - the situation was the same. I also ran a ksm testing procedure described here:

http://dustinkirkland.wordpress.com/2010/02/06/ksm-now-enabled-in-ubuntu-lucid/

still no activity showed by ksm.

As a last resort, I rebooted with kernel option "apparmor=0" and voila - ksm started running!!!

However - I could not find this connection between apparmor and ksm anywhere - so this post is just to inform you - BEFORE YOU RUN KSM ON UBUNTU, ALWAYS TURN APPARMOR OFF

No comments:

Post a Comment