0
votes

I need some information:

I have 2 redhat 6.1 Linux server with TOMCAT 7.0.28 and JAVA jdk1.7.0_05

On 192.168.1.20(TOM04) i have 1 instance TOMCAT 7 with the MBEAN "java.lang:type=MemoryPool,name=Perm Gen"

On 192.168.1.21(TOM01) i have 1 instance TOMCAT 7 with MBEAN "java.lang:type=MemoryPool,name=PS Perm Gen"

Why the MBEAN is not the same like "PERM GEN && PS PERM GEN" what does it mean? ( i want PS Perm Gen everywhere )

http://img27.imageshack.us/img27/5803/tom01u.png

http://img839.imageshack.us/img839/7539/tom04.png

Java version is the same: java -version java version "1.7.0_05" Java(TM) SE Runtime Environment (build 1.7.0_05-b06)

setnenv.sh 192.168.1.20(TOM04):

!/bin/bash

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib export LD_LIBRARY_PATH

export JAVA_HOME=/usr/java/default

JAVA_OPTS="$JAVA_OPTS -Xmx1024m -Xms512m -Xmn384m -server -XX:MaxPermSize=384m" JAVA_OPTS="$JAVA_OPTS -DLOG_ROOT_PATH=/opt/applogs/INSTANCE01" JAVA_OPTS="$JAVA_OPTS -Dcom.ogige.environment=PRODUCTION" JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError" JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=/opt/applogs" JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=2" JAVA_OPTS="$JAVA_OPTS -XX:SurvivorRatio=8"

export JAVA_OPTS=$JAVA_OPTS

setenv.sh 192.168.1.21(TOM01):

!/bin/bash

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib export LD_LIBRARY_PATH

export JAVA_HOME=/usr/java/default

JAVA_OPTS="$JAVA_OPTS -Xmx1024m -Xms512m -Xmn384m -server -XX:MaxPermSize=384m" JAVA_OPTS="$JAVA_OPTS -DLOG_ROOT_PATH=/opt/applogs/INSTANCE01" JAVA_OPTS="$JAVA_OPTS -Dcom.Ogige.environment=PRODUCTION" JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError" JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=/opt/applogs" JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=2" JAVA_OPTS="$JAVA_OPTS -XX:SurvivorRatio=8"

export JAVA_OPTS=$JAVA_OPTS

2
I have "migrate" my TOMCAT instance FROM: 192.168.1.20(TOM04) TO 192.168.1.21(TOM01) And everything is good i have the MBEAN "java.lang:type=MemoryPool,name=PS Perm Gen" instead of "java.lang:type=MemoryPool,name=Perm Gen" What's wrong with this host ;'( [192.168.1.20(TOM04)] - Canna
PS = parallel scavenge I don't know why i have not the same on the two host but anyway... I want to have all my instance with PS XXXX so i just add in setenv.sh ( JAVA_OPTS="$JAVA_OPTS -XX:+UseParallelGC" ) - Canna

2 Answers

1
votes

PS = parallel scavenge

I don't know why i have not the same on the two host but anyway... I want to have all my instance with PS XXXX so i just add in setenv.sh ( JAVA_OPTS="$JAVA_OPTS -XX:+UseParallelGC" )

1
votes

The 64-bit JVM defaults to the Parallel GC by default, whereas 32-bit JVM does not. That is why you see "PS Perm Gen" on one, and regular "Perm Gen" on the other. Most likely, one of them is using a 64-bit JRE/JDK and the other is using 32-bit (even if both machines are 64-bit)

You can of course specify GC options manually to force the same GC in both environments if you want...or, if they are both 64-bit... just verify you are using a 64-bit JVM in both environments. (or 32-bit in both environments, if memory is not an issue)

You can verify this by running "java -version" in both environments (assuming you are using the in PATH JRE/JDK and not a separate one specified by JAVA_HOME, which Tomcat might) and should see one say "64-bit Server VM" and the other will say "Client VM". At least, I can replicate your behavior in this way...