Our system doing repeated FULL GC calls almost every 60 odd seconds and that was affecting performance on Production machines. I found the GC happening using JConsole which comes bundled with Java5 upwards.
This was quite puzzling, but the good thing was it was happening predictably every 60 odd seconds. Sometimes the GC was taking 2-3 sec and sometimes less.
It seemed that some library we are using on TOMCAT side – has some hard coded System GC calls.
My initial thought was – that somecode was calling System.gc() every min or so. I searched through the whole code base but found no explicit GC in our code.
Then I researched the JVM Options and found this option
And decided to add it to the JVM Startup options and restart the production machines at night.
And then the FULL GC every minute vanished from the log.
Though I could never conclusively prove where the GC was coming from – but my belief was that some 3rd party library code – was calling System.gc() and once the flag was set on the JVM Startup – the GCs vanished.