Long pauses during gc
843811Aug 27 2004 — edited Aug 31 2004We are using a packaged Java based content management software package to manage our public website. It is running on beefy dual proc , 4 GB, DL380 hardware w/ Linux. The boxes are not stressed at all from a cpu/load perspective. We are running their software on top of Tomcat and start the JVM with the following parameters
-Xmx1024m -Xms1024m \
-XX:+UsePerfData \
-XX:NewSize=128m \
-server \
We are connecting with visualGC to monitor the heap and allocation by generation. Their software manages an internal cache of content related objects. We are able to set a percentage (MEM_MAX) which limits how much of the heap will be used for cache. They have a cache cleanup routine which runs periodically that checks the amount of free memory on the heap and if the used percentage is above the max that we set - it will remove objects from the cache in blocks of 100 until it gets below a second threshold that we set (MEM_MIN). They explicitly call System.gc() after each block of 100. Our current settings are MEM_MAX = 85 and MEM_MIN=84. We are seeing very long 'gc pauses' of 10 seconds + when their process decides to remove objects and call system.gc. If their cache was full we would expect to see only 10MB worth removed from the cache and recovered in the gc + anything hanging aroung in Eden. Because we are not yet to the point where we fill the cache we see more that 10 MG (closer to 90 -100) collected in the GC. The bulk of the objects are not part of the cache but get caught up in the long gc anyway. We can probable improve this situation by lowering the amount of the heap we make available for the cache - but our software vendor insists that these long pauses are abnormal and not experieced by other customers. They suggested we contact Sun for support. Any help or direct appreciated. We have tried other garbage collectors under different configurations with no luck.