[Building Sakai] tuning the JVM for maven

Charles Hedrick hedrick at rutgers.edu
Wed Jun 10 19:24:51 PDT 2009


I just found I could greatly speed up a build by changing some  
parameters. These are probably specific to my environment, but it  
still may be worth making some changes in the recommended MAVEN_OPTS

Environment:

Dell Optiplex 960 with 8 GB of memory, Intel Q9550, running OpenSuSE  
11.1
Xen VM  with 6 GB of memory and all 4 cores, running Centos 5.3, 64-bit
Java 1.6.0u14 (from Sun, not the one that comes with Centos)

By going from

setenv MAVEN_OPTS '-Xms256m -Xmx512m -XX:PermSize=64m - 
XX:MaxPermSize=256m'

to

setenv MAVEN_OPTS '-server -Xms256m -Xmx1512m -XX:PermSize=256m - 
XX:MaxPermSize=256m -XX:+AggressiveOpts'

I cut the time to build 2.6.x from over 11 min to 4 min.

I started this investigation because I found that on my new Mac Pro,  
without changing any options, build time is about 3 min. This is using  
Apple's 64-bit 1.6.0u13. The Q9550 shouldn't be that much slower than  
the Xeon 5500.  I may play with tuning on the Mac to see if I can do a  
bit better. But I conjecture that Apple has different default JVM  
tuning that Sun's Linux code.

(Incidentally, I'm not sure I recommend the Optiplex 960. It's a nice  
machine, but I wanted to run Solaris as the real OS. It won't boot on  
that machine. As a second choice, I chose OpenSuSE because of the  
major Linux distributions it seems to be the only one that is putting  
the Xen dom0 patches into a current Linux kernel. This whole thing was  
a test. I'll almost certainly do my real work on a Mac Pro. But I  
figured others might be working under Linux.)

(We're still doing our production builds under Java 5, but I'm using  
Java 6 for development and testing. We're trying to move production to  
6, but have run into a bug that crashes the VM. I believe we know what  
it is. I'll report on it when I'm sure. The current theory is that  
it's specific to Solaris.)




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2421 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090610/25ca4c10/attachment.bin 


More information about the sakai-dev mailing list