[Deploying Sakai] Java Opts

Martin B. Smith smithmb at ufl.edu
Sun Jun 20 16:40:40 PDT 2010


On 6/20/2010 6:20 PM, Drew Blessing wrote:
> Do Java Opts correlate to the amount of RAM that Java can use?  For
> instance, if my server has 8GB of RAM, do I need to change the Java Opts
> accordingly? 
> 
> If Java Opts do not correlate to RAM, do you recommend the values
> specified in the Source Install Guide (JAVA_OPTS="-server
> -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m")or are there better
> values to use?
> 
> Thanks for your help!  I know this is probably a novice question.

Hi Drew,

Depending on the version of Java you're using and the platform you're
running on (among other things), the Java virtual machine has an initial
heap size that may or may not meet your requirements.

For instance, in update 18 of Java 6, the default heap size calculation
was changed: http://java.sun.com/javase/6/webnotes/6u18.html

If you have 8GB of RAM, you probably do want to tune your JAVA_OPTS
parameters. Those you mentioned from the install guide are great, except
you may want to adjust Xmx to something like "6g" so that your JVM has 6
gigs of RAM to work with, and your OS has 2GB for general use, disk
cache, etc.

You can adjust XX:MaxPermSize upward from the default until you find
that you aren't getting "OutOfMemory: Permgen..." errors from it being
too small. There generally isn't a reason to increase the size of the
permanent generation beyond the minimum requirements for Sakai.

I'd recommend Googling for the "Java Memory Model" to get an idea of how
the 1.4, 1.5, and 1.6 JVMs use memory, and also checking out some of the
presentations from the recent Sakai conference in Denver -- a few
presentations covered these tuning considerations.

Good luck,
-- 
Martin B. Smith
smithmb at ufl.edu - (352) 273-1374
CNS/Open Systems Group
University of Florida

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5497 bytes
Desc: S/MIME Cryptographic Signature
Url : http://collab.sakaiproject.org/pipermail/production/attachments/20100620/fcd0eba5/attachment.bin 


More information about the production mailing list