[rhelv6-beta-list] A simple program runs under KVM faster than under nake PC.
Kirby Zhou
kirbyzhou at sohu-rd.com
Mon Aug 9 02:43:24 UTC 2010
A simple fact is that RHEL5 DO NOT have KSM.
RHEL6/nake
[root at djt_10_47 ~]# echo 2 > /sys/kernel/mm/ksm/run
[root at xen-727057^10.227 ~]# time ssh 10.12.10.47 ./a.out 1 10000
crc:a4580383
real 0m5.628s
user 0m0.000s
sys 0m0.000s
RHEL6/KVM
[root at djt_10_199 ~]# echo 2 > /sys/kernel/mm/ksm/run
[root at xen-727057^10.227 ~]# time ssh 10.12.10.199 ./a.out 1 10000
crc:a4580383
real 0m3.139s
user 0m0.000s
sys 0m0.000s
Regards
Kirby Zhou
-----Original Message-----
From: rhelv6-beta-list-bounces at redhat.com
[mailto:rhelv6-beta-list-bounces at redhat.com] On Behalf Of Sean Pajot
Sent: Monday, August 09, 2010 1:34 AM
To: Red Hat Enterprise Linux 6 (Santiago) Beta releases discussion
mailing-list
Subject: Re: [rhelv6-beta-list] A simple program runs under KVM faster than
under nake PC.
Crazy idea. How "simple" is this program? If you're using KVM, then KSM will
be merging identical pages. This can benefit CPU cache lines. Would this
account for the performance improvement?
Try turning off KSM, power down/up your test VM to flush all the pages, and
test again. It should also be possible to modify your app to use KSM for
itself on bare metal.
Kirby Zhou wrote:
>
>
> Both RHEL5/RHEL6 encounter the same situation.
>
> Is there any potential bug?
>
>
>
> ]# g++ testaes.cpp -lcrypto -lz
>
>
>
> RHEL6 nake
>
> [root at djt_10_47 ~]# time ./a.out 1 10000 | head -n 10000 | md5sum
>
> caba4fd0bae809e634b5cd8acd3424f2 -
>
>
>
> real 0m5.778s
>
> user 0m5.774s
>
> sys 0m0.014s
>
>
>
> RHEL6 KVM
>
> [root at djt_10_199 ~]# time ./a.out 1 10000 | head -n 10000 | md5sum
>
> 51722dcdf339f131a89eb2dc106d8dbe -
>
>
>
> real 0m3.272s
>
> user 0m3.266s
>
> sys 0m0.032s
>
>
>
> RHEL5 nake
>
> [@djt_10_48 ~]# time ./a.out 1 10000 | head -n 10000 | md5sum
>
> 51722dcdf339f131a89eb2dc106d8dbe -
>
>
>
> real 0m5.786s
>
> user 0m5.780s
>
> sys 0m0.008s
>
>
>
> RHEL5 KVM
>
> [@djt_10_192 ~]# time ./a.out 1 10000 | head -n 10000 | md5sum
>
> 51722dcdf339f131a89eb2dc106d8dbe -
>
>
>
> real 0m3.243s
>
> user 0m2.864s
>
> sys 0m0.387s
>
>
>
>
>
>
>
> Regards
>
> Kirby Zhou
>
>
_______________________________________________
rhelv6-beta-list mailing list
rhelv6-beta-list at redhat.com
https://www.redhat.com/mailman/listinfo/rhelv6-beta-list
More information about the rhelv6-beta-list
mailing list