[rhelv6-beta-list] A simple program runs under KVM faster than under nake PC.

Kirby Zhou kirbyzhou at sohu-rd.com
Mon Aug 9 06:42:48 UTC 2010


Please check my source code.
This is a PURE CPU program. No read, No Write.
So I do not think cache is the point.

Regards,
   Kirby Zhou    
   from   SOHU-RD   +86-10-6272-8261


-----Original Message-----
From: rhelv6-beta-list-bounces at redhat.com
[mailto:rhelv6-beta-list-bounces at redhat.com] On Behalf Of John Summerfield
Sent: Monday, August 09, 2010 8:01 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.

Kirby Zhou wrote:
> Both RHEL5/RHEL6 encounter the same situation.
> 
> Is there any potential bug?
> 
>  
> 
> ]# g++ testaes.cpp -lcrypto -lz

If the program is I/O bound, I would expect the virtual box to run 
faster _for smallish files_. hdparm can report I/O speeds an order of 
magnitude faster than on real machines.

The reason is that the host caches the real disk. If you overflow the 
cache, results will be different.

Time this, I find it's quire a bit slower in any VM I've tried.

#!/usr/bin/perl
#use integer;
$i = 0;
while ($i < 10000)
         {
                 $j = 0;
                 while ($j < 10000)
                         {
                                 ++$j;
                         }
                 ++$i;
         }

07:59 [summer at penguin ~]$


-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

_______________________________________________
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