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

Can anyone explain as to where and how do I configure the following JVM parameters to tune JBOSS. I am using the latest JBOSS AS 7.

I am using openJDK-6 on Linux.

The following are the parameters which I have used for tuning Tomcat-7 and I need to know how & where do I put these in JBOSS:

To configure Java heap:

-server -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2048m -Xmx2048m -XX:MaxPermSize=200m 
-XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15

To Configure Garbage Collector:

-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled XX:ParallelGCThreads=16 -XX:+CMSCompactWhenClearAllSoftRefs -XX:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark -XX:+CMSConcurrentMTEnabled -XX:ParallelCMSThreads=2
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

If you use the default startup scripts it should be sufficient to put this in the environment variable "JAVA_OPTS".

https://community.jboss.org/wiki/JavaOpts

share|improve this answer
    
Thanks for your answer. I am using ./standalone.sh command to start and stop the server, will try your solution. –  Prakash K Oct 25 '12 at 7:11
    
I gave all the values in JAVA_OPTS in standalone.conf like this JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -server -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled XX:ParallelGCThreads=16 -XX:+CMSCompactWhenClearAllSoftRefs -XX:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark -XX:+CMSConcurrentMTEnabled -XX:ParallelCMSThreads=2" –  Prakash K Oct 25 '12 at 11:23
    
After doing the above setting the server is not starting :-( –  Prakash K Oct 25 '12 at 11:24
    
Exactly what is the failure? Some log entries? I think the most valuable parameters are "-Xmx2048m -XX:MaxPermSize=256m" - drop the rest. –  cljk Oct 25 '12 at 13:27
    
yes with these two the server starts. I didn't get anything in the logs when the server didn't start. Also I need to configure the garbage collector as well so it is required –  Prakash K Oct 25 '12 at 13:28
show 1 more comment

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.