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.

Why does a 32bit domU (Xen guest VM) use less RAM than a 64bit?

Notes: The same software complied for a different arch(AMD64 vs. 686). Obviously this is Linux or BSD or something easily ported. Maybe this is also a good one for SO.

I've read this is so. I can guess why, but I'd like to hear everyone's comments.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Under the same workload, a 32-bit system will always use less memory than a 64-bit one, mainly due to two reasons: the bigger size of executables, pointers, variables etc., and the additional kernel overhead of managing a bigger address space.

This of course doesn't happen only to virtual machines, but to physical systems too.

share|improve this answer
    
Yeah, address space... Is this the reason why executables are larger as well? –  d-_-b Apr 18 '10 at 14:45
    
No, they're larger because they are compiled using 64-bit pointers and (usually) variables, instead of 32-bit ones. –  Massimo Apr 18 '10 at 14:50
    
No? What do you mean? A 64bit machine has a larger memory address space than 32-bit. Would not that make those pointers larger? You actually have to store a larger address. At least that was my guess. –  d-_-b Apr 19 '10 at 2:30
    
Well, we could say yes and no at the same time :-) The executables are larger not directly because of the bigger address space... but because they're compiled using larger pointers; in order to address it, of course. –  Massimo Apr 19 '10 at 5:31
1  
OK, good, I'm not a retard. I just wanted to make sure I understood what I was reading. In that case I will make my VMs 32bit - since none of them have access to more that 4GB of RAM anyway. Thanks for explaining that! –  d-_-b Apr 22 '10 at 14:23

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.