Skip to contentSkip to conversation

problems getting KSM running on newer 2.6.32.x kernels

DISCUSSION Nikola Ciprich 3 participants 4 messages Feb 1, 2010 – Feb 10, 2010 KVM

lore
Share & tools
lore
#0 lore raw

Hello,
it seems to me that after upgrading to some 2.6.32.x release, KSM stopped working for me. I'm not exactly sure which update did this, but enabling KSM doesn't seem to do anything, ksmd process just sleeps and doesn't merge any memory. Early 2.6.32 versions worked correctly for me, now I'm using 2.6.32.7 and qemu-kvm-0.12.2.

I'm enabling it using:

echo 262144 > /sys/kernel/mm/ksm/pages_to_scan
echo 100 > /sys/kernel/mm/ksm/sleep_millisecs
echo 1 > /sys/kernel/mm/ksm/run

Is there anything else I could check?
Thanks a lot for any hints
with best regards
nik

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#1 lore raw
Quoted 6 lines · Nikola Ciprich

Hello,
it seems to me that after upgrading to some 2.6.32.x release, KSM stopped working for me. I'm not exactly sure which update did this, but enabling KSM doesn't seem to do anything, ksmd process just sleeps and doesn't merge any memory. Early 2.6.32 versions worked correctly for me, now I'm using 2.6.32.7 and qemu-kvm-0.12.2.

Quoted 7 lines

I'm enabling it using:

echo 262144> /sys/kernel/mm/ksm/pages_to_scan
echo 100> /sys/kernel/mm/ksm/sleep_millisecs
echo 1> /sys/kernel/mm/ksm/run

Izik?

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 7 lines · On Tue, 09 Feb 2010 12:51:47 +0200 Avi Kivity <[email protected]> wrote:
Quoted 6 lines · Nikola Ciprich

Hello,
it seems to me that after upgrading to some 2.6.32.x release, KSM stopped working for me. I'm not exactly sure which update did this, but enabling KSM doesn't seem to do anything, ksmd process just sleeps and doesn't merge any memory. Early 2.6.32 versions worked correctly for me, now I'm using 2.6.32.7 and qemu-kvm-0.12.2.

Quoted 5 lines
Quoted 5 lines

I'm enabling it using:

echo 262144> /sys/kernel/mm/ksm/pages_to_scan
echo 100> /sys/kernel/mm/ksm/sleep_millisecs
echo 1> /sys/kernel/mm/ksm/run

Is it happen to you just in 2.6.32.x? what happen with 2.6.33.x?

I have tested it on 2.6.33.x and it seems to work...

Quoted 5 lines
Quoted 2 lines

Izik?

#3 lore raw

Hi Avi, Izik,

today I spent some time investigating the problem and I've found the culprit:
RHEL5 glibc doesn't define MADV_MERGEABLE, so qemu-kvm didn't compile with KSM support.
After I added -DMADV_MERGEABLE=12 -DMADV_UNMERGEABLE=13 CFLAGS, things started to work.
Strange it worked for me before - I don't remember using that kind of hack before, but nevermind, it works now!

thanks and sorry for my fault.

have a nice day

nik

Quoted 31 lines · Izik Eidus
Quoted 7 lines · On Tue, 09 Feb 2010 12:51:47 +0200 Avi Kivity <[email protected]> wrote:
Quoted 6 lines · Nikola Ciprich

Hello,
it seems to me that after upgrading to some 2.6.32.x release, KSM stopped working for me. I'm not exactly sure which update did this, but enabling KSM doesn't seem to do anything, ksmd process just sleeps and doesn't merge any memory. Early 2.6.32 versions worked correctly for me, now I'm using 2.6.32.7 and qemu-kvm-0.12.2.

Quoted 5 lines
Quoted 5 lines

I'm enabling it using:

echo 262144> /sys/kernel/mm/ksm/pages_to_scan
echo 100> /sys/kernel/mm/ksm/sleep_millisecs
echo 1> /sys/kernel/mm/ksm/run

Is it happen to you just in 2.6.32.x? what happen with 2.6.33.x?

I have tested it on 2.6.33.x and it seems to work...

Quoted 5 lines
Quoted 2 lines

Izik?

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------