public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* 64 bit guest much faster ?
@ 2009-10-23 15:54 Stefan
  2009-10-25  5:41 ` Avi Kivity
  2009-10-26  8:58 ` Gerd Hoffmann
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan @ 2009-10-23 15:54 UTC (permalink / raw)
  To: kvm


Hello,

I have a simple question (sorry I'm a kvm beginner):
Is it right that a 64bit guest (8 CPUs, 16GB) is
much faster than a 32bit guest (8 CPUs, 16GB PAE).
(kvm guest and kvm host are Ubuntu 9.04, 2.6.28-15-server,
kvm 1:84+dfsg-0ubuntu12.3). eg "dpkg-reconfigure initramfs-tools"
runs twice as fast on the 64bit guest.

Thanks

Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit guest much faster ?
  2009-10-23 15:54 64 bit guest much faster ? Stefan
@ 2009-10-25  5:41 ` Avi Kivity
  2009-10-26  8:58 ` Gerd Hoffmann
  1 sibling, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2009-10-25  5:41 UTC (permalink / raw)
  To: Stefan; +Cc: kvm

On 10/23/2009 05:54 PM, Stefan wrote:
> Hello,
>
> I have a simple question (sorry I'm a kvm beginner):
> Is it right that a 64bit guest (8 CPUs, 16GB) is
> much faster than a 32bit guest (8 CPUs, 16GB PAE).
> (kvm guest and kvm host are Ubuntu 9.04, 2.6.28-15-server,
> kvm 1:84+dfsg-0ubuntu12.3). eg "dpkg-reconfigure initramfs-tools"
> runs twice as fast on the 64bit guest.
>
>    

There shouldn't be that much of a difference.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit guest much faster ?
  2009-10-23 15:54 64 bit guest much faster ? Stefan
  2009-10-25  5:41 ` Avi Kivity
@ 2009-10-26  8:58 ` Gerd Hoffmann
  2009-10-26 10:12   ` Avi Kivity
  1 sibling, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2009-10-26  8:58 UTC (permalink / raw)
  To: Stefan; +Cc: kvm

On 10/23/09 17:54, Stefan wrote:
>
> Hello,
>
> I have a simple question (sorry I'm a kvm beginner):
> Is it right that a 64bit guest (8 CPUs, 16GB) is
> much faster than a 32bit guest (8 CPUs, 16GB PAE).
                                           ^^^^
Yes.  With *that* much memory the 32bit guest struggles with address 
space limitations (32bit -> 4G), whereas the 64bit guest doesn't.

With up to 1G you shouldn't see a noticable difference.  But the more 
highmem the 32bit guest uses the higher is the penalty.  Especially 
without ept/npt as every kmap() of a high page is a roundtrip to the 
hypervisor then.

cheers,
   Gerd


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit guest much faster ?
  2009-10-26  8:58 ` Gerd Hoffmann
@ 2009-10-26 10:12   ` Avi Kivity
  2009-10-26 10:42     ` Michael Tokarev
  0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2009-10-26 10:12 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Stefan, kvm

On 10/26/2009 10:58 AM, Gerd Hoffmann wrote:
> On 10/23/09 17:54, Stefan wrote:
>>
>> Hello,
>>
>> I have a simple question (sorry I'm a kvm beginner):
>> Is it right that a 64bit guest (8 CPUs, 16GB) is
>> much faster than a 32bit guest (8 CPUs, 16GB PAE).
>                                           ^^^^
> Yes.  With *that* much memory the 32bit guest struggles with address 
> space limitations (32bit -> 4G), whereas the 64bit guest doesn't.
>
> With up to 1G you shouldn't see a noticable difference.  But the more 
> highmem the 32bit guest uses the higher is the penalty.  Especially 
> without ept/npt as every kmap() of a high page is a roundtrip to the 
> hypervisor then.
>

Oh yes, without ept/npt the slowdown should indeed be significant with 
this much memory.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit guest much faster ?
  2009-10-26 10:12   ` Avi Kivity
@ 2009-10-26 10:42     ` Michael Tokarev
  2009-10-26 10:44       ` Avi Kivity
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2009-10-26 10:42 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Gerd Hoffmann, Stefan, kvm

Avi Kivity wrote:
> On 10/26/2009 10:58 AM, Gerd Hoffmann wrote:
>> On 10/23/09 17:54, Stefan wrote:
>>>
>>> Hello,
>>>
>>> I have a simple question (sorry I'm a kvm beginner):
>>> Is it right that a 64bit guest (8 CPUs, 16GB) is
>>> much faster than a 32bit guest (8 CPUs, 16GB PAE).
>>                                           ^^^^
>> Yes.  With *that* much memory the 32bit guest struggles with address 
>> space limitations (32bit -> 4G), whereas the 64bit guest doesn't.
>>
>> With up to 1G you shouldn't see a noticable difference.  But the more 
>> highmem the 32bit guest uses the higher is the penalty.  Especially 
>> without ept/npt as every kmap() of a high page is a roundtrip to the 
>> hypervisor then.
> 
> Oh yes, without ept/npt the slowdown should indeed be significant with 
> this much memory.

How it is with 4Gb guest/mem without PAE (I mean, with CONFIG_HIGHMEM_4G=y)?
Or even 2Gb?  In case of npt or without.

Can we construct a sort of a table of expected slowdowns (not in numbers
but just in terms "significant", "minor" etc) of running <4Gb or >4Gb
(and <1Gb and >1Gb if that makes significant diffencece) 32bit guests
with and without npt and 64bit guests, please?  I guess it's quite
interesting to many users.

 From the above it looks like it's better to run 64bit kernel in the 32bit
guest in these situations too.

I haven't measured it, just because it never occured to me that there
MAY be any difference.  But I've only non-npt hardware here at the
moment.

Thanks!

/mjt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit guest much faster ?
  2009-10-26 10:42     ` Michael Tokarev
@ 2009-10-26 10:44       ` Avi Kivity
  0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2009-10-26 10:44 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: Gerd Hoffmann, Stefan, kvm

On 10/26/2009 12:42 PM, Michael Tokarev wrote:
>> Oh yes, without ept/npt the slowdown should indeed be significant 
>> with this much memory.
>
>
> How it is with 4Gb guest/mem without PAE (I mean, with 
> CONFIG_HIGHMEM_4G=y)?
> Or even 2Gb?  In case of npt or without.
>

It'll be slow.  Just use x86_64 with > 1GB.

> Can we construct a sort of a table of expected slowdowns (not in numbers
> but just in terms "significant", "minor" etc) of running <4Gb or >4Gb
> (and <1Gb and >1Gb if that makes significant diffencece) 32bit guests
> with and without npt and 64bit guests, please?  I guess it's quite
> interesting to many users.

These tables will be useless, it greatly depends on workload.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-10-26 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 15:54 64 bit guest much faster ? Stefan
2009-10-25  5:41 ` Avi Kivity
2009-10-26  8:58 ` Gerd Hoffmann
2009-10-26 10:12   ` Avi Kivity
2009-10-26 10:42     ` Michael Tokarev
2009-10-26 10:44       ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox