[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [fedora-virt] disabling ksm by default



On 10/27/2009 04:42 PM, Justin M. Forbes wrote:
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

from http://forum.zwame.pt/showthread.php?p=5449039:


"I tested KSM out by creating a couple of Ubuntu 9.04 VMs with 1GB of RAM apiece and a Windows 7 VM with 2GB of RAM. Together, these VMs laid claim to the bulk of the 4GB of RAM available on my test Fedora 12 system.

When I switched KSM on, I watched the memory usage on my test machine fall, fairly quickly, from 3.1GB to 2.1GB as my system identified and merged duplicate memory pages. I want to see KSM in action on a more realistically outfitted system, but I'm impressed the capability as I've seen it so far.

Beyond KSM, I'm pleased to see that in Fedora 12, KVM will support hotplugging for virtual network adapters, and will present guest machines with an emulated hardware platform that remains consistent across upgrades of the hypervisor. Linux OSes tend not to care when hardware is changed underneath them, but this can cause problems with Windows. I've experienced broken Windows VM installs following KVM upgrades, and I welcome this improvement."


To me it sound that users have no idea about this script, and ksm merge to him just the zero pages of windows 7...

My feeling is that 99% of the ppl in the world that will use it, would just see the zero page merged and think "that is it..." The current behaivor in fedora 12 is misleading the user (at least it seems to me that it misslead that specific user)

Btw we can set this value from userspace if we want "echo 0 > /sys/kernel/mm/ksm/run"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]