Subject: Re: [vserver] Pros and Cons of 32/64bit guests on 64bit host
From: Martin <inkubus@interalpha.co.uk>
Date: Thu, 21 Aug 2008 13:14:37 +0100

On Thu, 2008-08-21 at 10:49 +0100, Ed W wrote:
<snip>
> Problems I have found though are that my PHP vservers take MUCH more
> (virtual) memory under 64bit than on 32bit... I am a bit baffled as to
> why, but it's about 4x the VSS allocation and a smaller multiple of
> the RSS allocation (the RSS bit fits with having data being up to
> twice the size, but the VSS allocation is bothering me)
<snip>
Not only with pointers and ints be twice the size, but you will also
loose more memory to issues such as alignment and packing in the memory
manager.  Also as x86_64 uses a byte prefix to mark instructions as
being 64 bit, the amount of memory used for instructions will also
increase (traded off against there being less instructions due to
changes in calling convention and having extra registers).  4 times
sounds a bit high but not unbelievable.  If the application creates lots
of small objects containing mixed data types and has lots of short
functions, it would seem correct.  If you're trying to track down
exactly what is going on, the output of /proc/<pid>/status
and /proc/<pid>/maps would be useful.

HTH

Cheers,
 - Martin