On Tue, 23 Mar 1999 12:17:23 +1100, Maksim Lin wrote:
>To get away from the torrent of 1.2 questions, here is one about
>jdk1.1.7:
>
>I have a quick question about the jvm's memory usage in linux. For
>instance if I have 3 jvm's running (all same version) will there be any
>sharing of memory resources between the jvms? As I understand it, the
>jdk is built using shared libs so should all of the running jvms be
>sharing only 1 copy of these libs in memory ?
>
>Why I ask is that I have tried the above scenario and have found that
>having 3 jvm's running uses up almost 3x the memory of having 1 runnning
>- leading me to think there is no sharing and wondering how much memory
>I'm going to need if I want to have a large number of small
>(co-operating) java apps running similtaneously (I know an alternative
>would be to use something like echidna which will let multiple apps run
>inside 1 vm, but will this is a nice solution it still has a problem
>since apps in the same vm are vulnerable to each other, ie. if one of
>the apps dies it can take the whole vm and all the other apps in it with
>it).
Linux automatically will share "code" memory. That is, the same physical
memory space will be used for all of the same physical code.
Now, PS and TOP show you what each process would take but not how much
is actually shared in the code sections.
Java has another thing that is not as easy to share: The classes.zip
class files. These are loaded by the JVM into each JVM. This is not
shared automatically. However, there is hack to the VM system called
MergeMem that addresses this type of shared data too. I, personally,
do not use it but I have seen it work. The web site is:
http://das.ist.org/mergemem/
Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] --------- http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]