[fedora-virt] disabling ksm by default

Justin M. Forbes jmforbes at linuxtx.org
Tue Oct 27 14:42:09 UTC 2009


On Tue, Oct 27, 2009 at 02:37:50PM +0200, Dan Kenigsberg wrote:
> On Tue, Oct 27, 2009 at 12:24:13PM +0200, Izik Eidus wrote:
> > On 10/27/2009 12:12 PM, Mark McLoughlin wrote:
> >> Hi Izik,
> >>
> >> On Tue, 2009-10-27 at 00:55 +0200, Izik Eidus wrote:
> >>    
> >>> Hi, I saw that Fedora 12 will have ksm tunning script that control the
> >>> ksm speed / kernel pages allocation.

There are actually 2 init scripts.  One to turn on ksm, and one for tuning.
The actual ksm init script simply makes sure ksm is turned on in the kernel
and sets max_kernel_pages to half of system memory.  The ksmtuned script is
a bit more involved.

> >>> The only problem that I have is - as far as I remember ksm is by default
> >>> enabled and only with 2000 kernel pages...
> >>> What I am worried about is that users wont use the ksm tunning script
> >>> and would just run ksm with this 2000 kernel pages -
> >>> the result would be that ksm will probably merge just the zero pages
> >>> (that could be alot of memory) and the user might not know
> >>> that much more memory can be saved...
> >>>
> >>> Is it possible to at least make ksm disabled by default? so the users
> >>> will have to run the ksm tunning script when they want to start ksm?
> >>>      
> 
> Actually, Izik is refering to the fact that ksm is, by default, running
> when the kernel boots.
> 
While I do understand what you are saying, I don't think it is worth making
a kernel change for at this point in the cycle.  Because ksm itself has a
separate initscript, people who wish to use ksm will likely turn it on.
This sets the max_kernel_pages to a reasonable value.  People who are not
interested enough to turn on the ksm service are probably not the kind of
people who will be checking to see how effective ksm is at all.

Justin




More information about the Fedora-virt mailing list