I've just been reading about the mergemem kernel patch.  I haven't noticed
any reference to it on this list before, so thought I'd draw it to your
attention and ask if anyone has any experience with it.  For details see:

   http://www.mondoshawan.ml.org/mergemem/
   http://www.complang.tuwien.ac.at/ulrich/mergemem/

In brief, mergemem examines the memory belonging to processes running the
same program and marks identical pages as 'read-only and 'copy-on-write'.
This is in addition to the normal steps that the Linux kernel takes to
share memory.

The JVM initialises large amounts of data memory when it loads its class
files.  Most of this memory will never be written to during the life of
the JVM, and separate instances of the JVM will load the same stuff.  There
thus seems to be considerable scope for sharing memory.

At the mergemem site they quote memory usage figures for JDK 1.1.3 running
some of the demo applets:

   First instance of JVM            12488 kB
   Further instance w/o mergemem     7612 kB
   Further intstance with mergemem   2452 kB

This looks like a very promising approach for those who need to run multiple
instances of the JVM.

Ron Yorston                                    direct phone:  +44 1628 587074
PGS Tigress,                                          phone:  +44 1628 587000
Grenfell House, Grenfell Road,                          fax:  +44 1628 587111
Maidenhead, Berks,                                   e-mail:  [EMAIL PROTECTED]
SL6 1ES, UK

Reply via email to