Page 1 of 2

32 or 64 guest

Posted: 28. Mar 2014, 20:02
by Gabriel123
At the moment i use a Windows 64 bit host. Now i want to use Virtual Box to run a Linux guest. So my questen is:
Does a 32 or a 64 bit guest have a better performance.

PS: My notebook has 8 GB RAM and i want to use the guest with 4 GB RAM

Thanks for answers.

Re: 32 or 64 guest

Posted: 28. Mar 2014, 20:45
by loukingjr
There is no simple answer to your question. Some Linux distros are faster than others whether 32 bit or 64 bit. A lot of the performance has to do with the distro's desktop environment. It also depends on what kind of performance you need.

Re: 32 or 64 guest

Posted: 28. Mar 2014, 21:12
by Gabriel123
loukingjr wrote:There is no simple answer to your question. Some Linux distros are faster than others whether 32 bit or 64 bit. A lot of the performance has to do with the distro's desktop environment. It also depends on what kind of performance you need.
Thank you for your answer, but unfortunately that‘s not what i meant? I only want to know, wether it is possible that not matter what distribution you use the 32 bit version run faster than the 64 bit version in Virtual Box on the basis of the emulation?

Re: 32 or 64 guest

Posted: 28. Mar 2014, 21:57
by loukingjr
what I said applies to both a physical machine or a virtual one.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 00:36
by bulletmark
It's 2014, use 64 bit machines everywhere. I.e. in both VM hosts and guests.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 02:06
by loukingjr
that's more or less true but there are still applications on OSX, Windows and Linux that only have 32 bit versions. 32 bit software running on a Windows 64bit host would actually be slower than if they were on a 32 bit host because they run in Windows Wow mode or whatever it's called. I still don't think there is a 64 bit Version of Google Chrome for OSX. I don't think any of it really matters because many people who ask about performance are asking because they want to play games and virtual machines aren't all that great for playing games anyway whether 64 bit or not. And of course there are still Linux distros only developed for 32 bit. I for one don't fret over the performance differences.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 03:47
by mpack
bulletmark wrote:It's 2014, use 64 bit machines everywhere. I.e. in both VM hosts and guests.
That's a fashion statement, not a technical assessment of need. People generally don't need 64bit VMs - for example if you give the VM less than 4GB then 64bit RAM addressing is almost pointless.

And I would be less cagey than my colleague: all else being equal, 32bit will give better performance. The main driving force behind 64bit systems is that CPU mfrs are having trouble making CPU's go faster, and you can only fit so many cores on a die, so they need some other "performance" feature to sell to the muggles.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 04:25
by Gabriel123
bulletmark wrote:It's 2014, use 64 bit machines everywhere. I.e. in both VM hosts and guests.
But what i really what to know is wether the simulation of a 32 bit CPU works better then the simulation of a 64 bit CPU. And so a 32 bit guest system maybe works faster then a 64bit guest.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 06:01
by bulletmark
mpack wrote:
bulletmark wrote:It's 2014, use 64 bit machines everywhere. I.e. in both VM hosts and guests.
That's a fashion statement, not a technical assessment of need. People generally don't need 64bit VMs - for example if you give the VM less than 4GB then 64bit RAM addressing is almost pointless.
Saying "people don't need" is what is pointless. Installing a 64bit guest costs nothing more and any performance difference either way is insignificant. 64 bit is the mainstream now so my point is, to keep things simple, just use a 64 bit install everywhere. Banish 32 bit systems to the past.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 14:01
by mpack
Nonsense. A 64bit VM does cost more - of every resource. If the VM doesn't need those resources then it makes little sense to allocate them. I personally don't care a tinkers cuss what you say the mainstream is, that's just the same fashion statement again, and I've never been interested in technology-as-fashion. Anyway the most recent figures I've seen say that XP is still the most used OS, and that's 32bit - so even the fashion statement doesn't bear scrutiny.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 14:12
by mpack
@Gabriel123. I see that you've asked the same question in the German language forum. Note that we normally don't allow cross posting, please bear that in mind for the future - though I'll let things be this time given this unusual example.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 14:32
by loukingjr
Gabriel123 wrote: But what i really what to know is wether the simulation of a 32 bit CPU works better then the simulation of a 64 bit CPU. And so a 32 bit guest system maybe works faster then a 64bit guest.
Why don't you do this since it won't cost you anything more than a little time. Choose a mainstream Linux distro, download the 32bit and 64 bit .isos with the same DE, install them both as guests with the same settings. It shouldn't take more than 5-10 minutes each, then run them both and see which you think is faster.

then you will know which is faster for that particular Linux distro.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 14:58
by Perryg
If I might add to the discussion. There most certainly is a cost. Some applications ( actually most ) are written to work in 32-bit. These can be used most of the time in 64-bit machines but with 32-bit mode OS drivers. This adds another overhead and is what causes many difficulties, hangs, crashes, Etc.

So it does mater and should be considered when selecting an OS. I have both 32 and 64 bit guests for this very reason. If the guest/s are just to play around with that is one thing, but using them in production, you want the one that is most stable.

Re: 32 or 64 guest

Posted: 29. Mar 2014, 17:11
by mpack
Gabriel123 wrote:But what i really what to know is wether the simulation of a 32 bit CPU works better then the simulation of a 64 bit CPU
VirtualBox doesn't simulate the CPU, code runs natively on the host processor, at native speeds. The only thing VirtualBox simulates is peripheral hardware: the surrounding PC.

Re: 32 or 64 guest

Posted: 31. Mar 2014, 11:57
by Ramshankar
I'm not going to get into the tradeoffs between running 64-bit code and 32-bit code in general. As far as VirtualBox is concerned, with our Intel VT-x implementation, there is a tiny performance hit while running 64-bit guests[1]. However, this is mostly negligible and not a reason to avoid 64-bit guests with 4.3.x.

This is because the world-switcher has to save/restore a few more MSRs that are specific to 64-bit (Kernel GS Base etc.) which are expensive. However, this can only be noticed if you run specific benchmarks that exercise the guest in a very specific way (i.e. trigger a lot of VM intercepts). I've optimized this on trunk to perform lazy MSR save/restore and on trunk there is practically no difference between 64-bit and 32-bit guests on VT-x in this regard.