[Request] Running server JVM in Max
Some code I am writing right now for a project should make substantial use of the optimizations available in the Server JVM. I tried adding
max.jvm.option -Xserver to my max.java.config.txt and from examining the process in VisualVM I see that even though the -Xserver option does seem to be passed, Max is still using the Client JVM.
I tried this with MaxMSP 5.1.9 and Max 6.0.5 on OS X 10.7.4, Java 1.6.0_33.
Is this a bug or an intentional part of the mxj design? I know the server JVM will have longer startup/class loading times and a larger memory footprint, but for this project I suspect the tradeoff would be worth it to gain the additional optimizations. Is it possible to update Max to respect this JVM option?
As a work around, I know I should be able to use other JVM options to get some of the optimization behavior of the server JVM I am after.
Before I get into trying a bunch of performance tests with different JVM options, I wanted to ask if there is a known list of JVM options that Max does/doesn’t respond to as other than my experiment with the
-Xserver option I am not sure how to confirm that the other JVM options are actually being used (as said in the original post, I do see the -Xserver option as an option to the JVM being run by Max, but it is still showing up as the client JVM).
Hmm – odd. Even though
java -version in the Terminal claims HotSpot Server (on both Lion and Mountain Lion), Max starts up with client, thus:
The argument should be
-server rather than
-X means nonstandard, although many nonstandard options have been standard for at least a decade). I tried that and mxj wouldn’t start up at all. I’m guessing that
-server isn’t getting passed to
JNI_CreateJavaVM() in the correct manner.
Is it possible that cycling74 update Max to respect this JVM option? (client or server)