У нас есть приложение на java6 / solaris с hibernate3 / ehcache и наблюдаем странную схему использования кучи (xmx = xms = 4G) - есть пики от 1.5G до 2.5G, каждый в 5 секунд примерно, как: / | / | / | / | / | Но в то же время в ehcache мы наблюдаем пропадание кеша через несколько дней (поэтому кеши теплые) (через запись в журнал из org.hibernate.Interceptor # onPrepareStatement hook).
Итак, вопрос в том, как может происходить промах кэша в ehcache, если над пиками все еще остается 1.5G свободной кучи? Это некоторые проблемы с реализацией ehcache SoftReference?
Параметры GC: * 1005 *
-XX: + DisableExplicitGC
-XX: + UseParNewGC
-XX: ParallelGCThreads = 10
-XX: SurvivorRatio = 8
-XX: TargetSurvivorRatio = 50
-XX: MaxTenuringThreshold = 5
-XX: + UseConcMarkSweepGC
-XX: CMSInitiatingOccupancyFraction = 70
-XX: + UseCMSInitiatingOccupancyOnly
-XX: + CMSClassUnloadingEnabled
-XX: + CMSParallelRemarkEnabled
-XX: + CMSScavengeBeforeRemark
-Xms4G
-Xmx4G
-Xmn1024m
-Xss512k
-XX: PermSize = 128m
-XX: MaxPermSize = 256m
echache.xml (большинство сущностей имеют отношения друг с другом и не имеют большого количества полей):
<defaultCache
maxElementsInMemory="10000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
<!-- Entities regions -->
<cache name="<class>"
maxElementsInMemory="1500000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="3000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="50"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="50000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="10"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="10000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="1000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="200000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="10000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="50"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="50"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="70000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="50"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="7000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="800000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="10000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="70000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>"
maxElementsInMemory="100000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<!-- Collections regions -->
<cache name="<class>.<collection>"
maxElementsInMemory="1500000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>.<collection>"
maxElementsInMemory="200000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>.<collection>"
maxElementsInMemory="500000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>.<collection>"
maxElementsInMemory="10000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>.<collection>"
maxElementsInMemory="800000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>.<collection>"
maxElementsInMemory="70000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
<cache name="<class>.<collection>"
maxElementsInMemory="100000"
eternal="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU" />
S