Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have the following parameters in tomcat6.conf

JAVA_OPTS="-server -Xmx6144m -Xms3072m -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=999 -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname= -Djava.rmi.server.useLocalHostname=false" 

but at peak time I see the following regularly,

ERROR memory-watcher - used 87.73865761212004%, max 6403194880 reaping at priority CRITICAL

is there any parameter I can use to to tune tomcat performance or GC ?

share|improve this question

1 Answer 1

The "-Xms3072m" and "-Xmx6144m" bits are where you're configuring your starting heap size and your max heap, respectively.

This is distinct from the "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" bits, where you set up the generation memory (where the JVM stores classes, rather than the heap where it stores objects). One thing I notice here is that the sizes are different. Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection.

You might also want to try "-XX:+UseParallelGC" instead of "-XX:+UseConcMarkSweepGC"...Usually if I have problems with one, then I have better luck with the other.

share|improve this answer
    
Thanks for this, you know where you said "Usually you want it to be the same for some cryptic reasons having to do with minimizing garbage collection." Do you means the size of "-XX:ReservedCodeCacheSize=128m" and "-XX:MaxPermSize=256m" should be the same ? –  arashsami Jul 11 '13 at 17:03
    
I think he means make your minimum and maximum heap sizes the same e.g. "-Xms6144m -Xmx6144m". –  Fred Clausen Jul 12 '13 at 7:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.