On Thu, 26 Jun 2014 07:07:04 -0700, Rich Morin wrote: > However, dozens of Neo4j (and JVM?) instances could use up a lot of > memory, even if the data sets are small. So, assuming that the instances > are running directly under the (Linux or Mac OS X) operating system), > could they share unmodified memory pages (eg, for dynamic shared > libraries)? Any caveats, references, or suggestions would be > appreciated! > > -r
For normal programs, yes shared libraries are "shared" in read only or copy on write pages. For java, the libs that the jvm itself uses would behave that way. As for if or the jvm is sophisticated enough to create and utilize additional shared pages for the shared java byte code libraries - maybe a java person knows, I doubt it. Although in the case you describe the problem is going to be the memory required for the data will be many more times greater than the code. The old way of dealing with this would be to use ulimit which is not likely to work. The new way is to use control groups to divide the memory up or enforce some other fair use policy. One easy way to do that would be to spawn the multiple instances with systemd. You could try just doing nothing, and seeing how well jvm behaves. It does have a bad reputation though (as in grabs all available memory, and tries to be smarter than the os, while at the same time the os is trying to be too smart by half with over committed memory). I'm curious. There is also this notion in some hyper visor visualization technologies of trying to automatically detect if some pages from different VMs are actually identical and optimizing host page usage, but that is more of a marketing hot air than a real way to solve problems. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
