on 6/26/03 4:47 PM Noel J. Bergman wrote: > [Reply in multiple pieces based on sub-topic] > > >>>A problem with multiple JVM instances is the lack of sharing between >>>multiple instances. > > >>on some operating systems, different JVMs share as much as 80% of >>their memory. > > >>>I would like to see the JVM/JIT generate and share common class >>>code on platforms that support it. > > >>This is already there. > > > On which platforms? And are we talking about the same thing? Are you > saying that if I do > > export CATALINA_BASE=/site1; startup.sh > export CATALINA_BASE=/site2; startup.sh > export CATALINA_BASE=/site3; startup.sh > ... > export CATALINA_BASE=/siteN; startup.sh > service james start > > that the N separate sets of Tomcat processes and James are sharing memory > images for all common class code?
I don't remember where or when, but I remember reading about some JVM (I would suspect JVM for Solaris on Sparc, from a marketing perspective, but Sun hardware marketing never talks to the Sun software marketing so you never know how dumb they can end up being) that would share memory if many JVM were running on the same machine. Now, I really can't tell you *what* kind of memory they share. I think that sharing *all* common classes is a potentially high security problem, so probably they just share native code, jvm code (not the local stack, of course) rt.jar and endorsed libraries. Which is probably 20Mb of stuff. I think it's totally reasonable to think that you can have james and tomcat running on the same machine where both JVM use 30Mb of RAM (each), but 20Mb are shared so the real usage is 20Mb + 10Mb (for tomcat) + 10Mb (for James) = 40Mb which is less than what your "top" says 30Mb + 30Mb = 60Mb. of course, the more processes you run, the better because at that point, the 20Mb overhead of the JVM is diluted across all running processes and become, more or less, equivalent to an OS overhead. >From memory analysis of my very laptop, I suspect that the Apple JVM that ships with MacOSX does exactly this. In fact, you can have many java stuff running on MacOSX without noticing (unless it's eclipse, but that's another story since it's not even close to be optimized for macosx) I heard that Oracle had a superscalar multi-process JVM (running inside their database! to allow stored procedures in java) but don't know if ever went in production. I would not be surprised to see even IBM JVM having some fancy inter-process shared memory facility as well. > Do you know when/where that was > introduced? If not with 1.2 for sure with 1.3 but I really don't remember more (or maybe I thought about it so much that I convinced myself it's already working this way ;-) -- Stefano. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
