Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm going to install Ubuntu 10.04 Server in a virtual machine and want run MySQL and Lighttpd on it.

Are there any benefits or disadvantages between 64-bit and 32-bit virtualization, except the 4 gigabyte memory limit on 32-bit machines.

I use Virtualbox.

share|improve this question
    
What is your host, 32 or 64 bits? –  John Gardeniers Jan 13 '11 at 20:50
    
It's Windows 7 64-bit. –  Jonathan Egerton Jan 13 '11 at 21:27

4 Answers 4

up vote 3 down vote accepted

Are there any benefits or disadvantages between 64-bit and 32-bit virtualization, except the 4 gigabyte memory limit on 32-bit machines.

There are a number of advantages to running in a 64 bit environment. The biggest is, as you say, the ability to address large amounts of memory. While you can get your 32bit kernel to address more than 4GB of RAM, individual processes will still be limited to 4GB. This affects not just "real ram", but their entire virtual address space...which is a particular problem if applications plan to make extensive use of virtual memory via mmap() or other techniques. The varnish http cache is a prime example of this. Discussed here and elsewhere.

This article from AMD (warning: PDF) discusses 64-vs-32 bits in some detail.

There are theoretical performance advantages to a 64 bit systems caused by more registers, wider memory fetches (that is, more bits read per read operation), and so forth, but the data I've seen so far suggests that performance of 32 vs. 64 bits isn't currently much of a reason to select one or the other.

share|improve this answer
    
It really depends on the application. MySQL ran a lot better on 64-bit with the same hardware (I hear its because it uses a lot of 64-bit integers internally, I've never looked for myself). If an application uses >2GB of RAM it's usually faster as 64-bit as well. Most applications don't use that much memory or use many 64-bit integers. For the ones that do, its much faster. –  Reece45 Jan 13 '11 at 20:40
    
@AlReece45 That's what I said. Some applications benefit from 64 bit architectures, others less so. I was not able to find any good data regarding performance differences between the two architectures; if you're aware of actual numbers I'd appreciate a pointer because there appears to be a lot of really bad information out there propogated by people who say things like, "32 bit are faster" or "64 bits will use more memory", etc., without backing up such statements. –  larsks Jan 14 '11 at 1:31

The 32bit guest will use less memory. I generally use 32bit guests on my 64bit host unless I have a specific reason. If you need the high memory then go 64.

share|improve this answer

One consideration is the RAM requirements of the virtual machine. You will find that MySQL and Lighttpd use more memory in 64bit Ubuntu compared to 32bit Ubuntu.

So I like to use 32bit installations on small VMs with little RAM, such as 512 or less. You would see these lower end configurations often with many VPS providers like linode or slicehost.

share|improve this answer

The only benchmarks I've seen to show a real virtue for 64 bit code was for mysql (and db in general), this was running on a Sun Ultra 5 (in RISC land, 32 bit is almost always faster by a little), if performance matters, it can maker a real difference.

One other point, VMware says to set the VM to use one CPU unless you need more performance, as it is generally faster (there is overhead from multiple virtual cpu).

share|improve this answer
    
do you have a link to these benchmarks? –  larsks Jan 14 '11 at 1:31
    
osnews.com/story/5768 for the SPARC benchmarks. I thought the advantage was bigger. –  Ronald Pottol Jan 14 '11 at 4:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.