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.

i've a problem with our jmx monitoring. we monitor the perm gen of some jvms with jmx. but from time to time the name of the mbean changes from "PS Perm Gen" to "Perm Gen" or vice versa. it happens with a restart of the tomcat server, but not with every restart.

the jvm version is 1.5.0_16.

has anyone experienced this problem and perhaps has a solution?

share|improve this question
    
Do you have a sample log that shows this change? –  blueberryfields Feb 1 '10 at 16:48
    
no. i only see the change in the mbeans section of jconsole. is there way to log the change to a file? –  Christian Feb 1 '10 at 19:07
add comment

1 Answer

up vote 7 down vote accepted

You are presumably using different garbage collectors. The name of the PermGen memory area is different depending on the selected garbage collector:

  • -XX:+UseParallelGC : PS PermGen
  • -XX:+UseConcMarkSweepGC : CMS PermGen
  • -XX:+UseSerialGC : PermGen

Looks like Tomcat is started up with either the serial ( stop-the-world ) collector or the parallel collector.

Verify any inconsistencies in the startup scripts or the environment settings.

Update: The garbage collector and memory settings are influenced by the JVM ergonomics , which means that they get auto-selected at startup based on the characteristics of the computer the JVM is running on. I can't find any references right now but IIRC they are based on CPU architecture and total memory available.

I suggest you specify one of the garbage collectors in your startup scripts. Depending on your application, it might not be good to have a random garbage collector picked.

share|improve this answer
    
the garbage collector is not explicitly set for the tomcat. is there a way it could change dynamically or influenced by other parameters? –  Christian Feb 2 '10 at 7:17
    
See my update. Although I don't think the garbage collector could be swapped at runtime. This is the Sun JVM, right? –  Robert Munteanu Feb 2 '10 at 8:40
    
yes, it is sun. –  Christian Feb 2 '10 at 9:06
    
i've read your link to jvm ergonomics. the tomcat is running on a vmware guest. but we didn't change cpu or ram on this guest. i tried changing the parameters for heap space on another system, but with no result to the mbeans. –  Christian Feb 2 '10 at 9:26
1  
Had similar issue, moving to 1.6 fast the good solution. And in our case took only 6 hours to the main developer solve the problems. Cheaper thant the hours that I spend debuging the problem. –  Carlos Feb 1 '11 at 11:00
show 2 more comments

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.