Ehcache 2.10.5 | Product Documentation | Ehcache Operations Guide | Tuning Garbage Collection | About Garbage Collection and Ehcache
 
About Garbage Collection and Ehcache
Applications that use Ehcache can be expected to use large heaps. Some Ehcache applications have heap sizes greater than 6 GB. Ehcache works well at this scale. However, large heaps or long held objects, which is what a cache is composed of, can place strain on the default Garbage Collector (GC). With Ehcache 2.3 and higher, this problem can be solved with BigMemory Go, an in-memory data management product, which provides an additional store outside of the heap. For more information, see the BigMemory Go product documentation.
Detecting Garbage Collection Problems
A full garbage collection event pauses all threads in the JVM. Nothing happens during the pause. If this pause takes more than a few seconds, it will become noticeable.
The clearest way to see if this is happening is to run jstat. The following command will produce a log of garbage collection statistics, updated every ten seconds.
jstat -gcutil <pid> 10 1000000
The thing to watch for is the Full Garbage Collection Time. The difference between the total time for each reading is the amount of time the system was paused. A jump of more than a few seconds will not be acceptable in most application contexts.

Copyright © 2010-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release