ksmd - what is expected behavior?
Tom London
selinux at gmail.com
Tue Oct 27 16:08:55 UTC 2009
On Tue, Oct 27, 2009 at 8:59 AM, Mark McLoughlin <markmc at redhat.com> wrote:
> Hi Tom,
>
> On Tue, 2009-10-27 at 08:58 -0700, Tom London wrote:
>> I'm running Rawhide with a qemu-kvm VM that runs WinXP.
>>
>> I'm noticing 'ksmd' running at a constant 15-25% of my cpu, for example:
>>
>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
>> 32 root 25 5 0 0 0 S 21.2 0.0 2:06.75 ksmd
>> 2265 tbl 20 0 1227m 530m 8256 R 17.2 13.5 3:09.05 qemu-kvm
>> 1599 root 20 0 220m 42m 17m S 5.3 1.1 0:55.02 Xorg
>> 2203 tbl 20 0 1234m 62m 24m S 5.0 1.6 0:28.93 rhythmbox
>>
>> Checking, I see that "ksmd" is running, but "ksmtuned" is not.
>>
>> System is Thinkpad X200 with 4GB RAM. VM image is configured at 512MB.
>>
>> Is this "to be expected" behavior?
>
> We're just discussing something similar on the fedora-virt list
>
> Currently, ksm is enabled by default in the kernel - since it's disabled
> by default in 2.6.32, we'll probably switch to that behaviour
>
> Do you have the ksm or ksmtuned init scripts enabled? Does enabling
> ksmtuned help reduce the CPU usage?
>
> Cheers,
> Mark.
>
Appears that Rawhide has "ksmd" enabled by default. "ksmtuned" is not
enabled by default.
Starting ksmtuned via
[root at tlondon init.d]# service ksmtuned start
Starting ksmtuned: [ OK ]
[root at tlondon init.d]#
Had no immediate effect (in fact, appeared to increase CPU up to about
28-30%) for about a minute or 2.
But after that, top no longer reports ksmd:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2265 tbl 20 0 1227m 530m 8256 S 17.2 13.5 6:04.56 qemu-kvm
2298 tbl 20 0 849m 161m 27m S 13.2 4.1 1:18.68 firefox
1599 root 20 0 219m 44m 17m S 9.3 1.1 1:28.51 Xorg
2203 tbl 20 0 1235m 64m 24m S 4.0 1.6 0:53.86 rhythmbox
1903 tbl 9 -11 541m 29m 28m S 3.0 0.8 0:23.55 pulseaudio
But I notice that "ksm" appears off:
[root at tlondon init.d]# service ksm status
ksm is not running
[root at tlondon init.d]# service ksmtuned status
ksmtuned (pid 2559) is running...
[root at tlondon init.d]#
Interesting tuning.... ;)
Any idea what is going on?
tom
--
Tom London
More information about the fedora-test-list
mailing list