0
votes

I'm kinda lost in the java-options world

I've got a server and I'm doing some research for tuning issue

I found some options that I want to set for my jvm used by Tomcat (ie Xmx, Xms)

where have I got to put thoswe settings? in setenv?

I tryed:

Export JAVA_OPTS="$JAVA_OPTS -server -Xmx512m -Xms512m"

then restart Tomcat and

java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize'

gave me (like before)

uintx MaxHeapSize := 1035993088

I think I missed something

Plus I've got 64bit system and 8GB RAM, accrding to my research I found that I can set Xmx to 6GB, but none information about Xms. Any advice? thank you all

1
Their are two optiona to do it. One create a seperate file setenv.sh or edit catalina.sh. Go to line no 54 in calatina.sh. Probably help.SachinSarawgi
Followed the suggested actions but in every case java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize' return uintx MaxHeapSize := 1035993088Nogothwen
setenv.sh is the right place, but you can also set the variable in the shell and export it. Will be picked up as long as there is no assignment in setenv.sh of it, which would override it of course.gsl

1 Answers

1
votes

The second "java" command has nothing to do with your running Tomcat! This starts just a second JVM.

If you want to see the arguments with which your Tomcat JVM was actually started, then on Linux use ps eww -p <pid> or pargs <pid> on Solaris.

Btw, CATALINA_OPTS is prefered over JAVA_OPTS, the latter one is used for all Java processes started by the tomcat Installation, and CATALINA_OPTS only for the main server process.