1

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.

1 Answer 1

4

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.

7
  • Yeah, address space... Is this the reason why executables are larger as well?
    – d-_-b
    Apr 18, 2010 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, 2010 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, 2010 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, 2010 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, 2010 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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