[hunchentoot-devel] how much virtual memory do your servers use?
Phil Jordan
lists at philjordan.eu
Sun Jan 6 21:36:07 UTC 2008
Robert Synnott wrote:
> I've two lisp instances both with about 8GB virtual memory, on a 64bit
> machine with 2GB of RAM. Effectively no swap in use, and plenty of
> physical memory free. I'm not sure that the virtual memory figures are
> in themselves very meaningful
It sounds like the "virtual memory" figure is the amount of reserved
address space. I suspect the garbage collector expects all of its
managed memory to be in a certain address range, and to enforce this, it
mmap()s [1] those pages to anonymous private memory (or equivalent on
non-Linux systems) so no external libraries can grab them. Private
memory pages are handled as copy-on-write, and anonymous memory is
zero-initialised. So in effect, most of those 500+MB are probably
actually mapped to the same page of physical memory filled with zeroes,
at least until anything is written to them, at which point that page
will get its own chunk of memory.
[1] http://linux.die.net/man/3/mmap
~phil
More information about the Tbnl-devel
mailing list