[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Dynamic cache sizes  XML
Forum Index -> Ehcache
Author Message
fosorio

neo

Joined: 08/06/2014 11:29:37
Messages: 1
Offline

I'm using ehcache 2.8.2 (migrated from 1.6.2) on a large reporting application. Due to out of memory errors, I'm changing the configuration from being bounded by the number of elements (maxElementsInMemory) to being bounded to heap memory (maxBytesLocalHeap/maxBytesLocalDisk) on the cacheManager level . Unfortunately, this is not working very well.

The application has around 100 caches (one for each report). This makes it convenient to manage the caches separately. However, when using a maxBytes configuration to pool the heap space between the caches, each cache only takes 1/100 of the pool. The application would have around 5 or 6 caches in use at a given moment, so this constraint is massively inefficient in our case.

What we would like to do is to have maxBytesLocalHeap as the limit size of all caches, but each cache could take the amount of memory it needs, without being bounded to 1/100 of the size of the pool (Perhaps using LRU across caches). Of course, the sum of the size of all caches should be smaller than the pool.

Is this possible to do with ehcache? What alternatives would you suggest in this case?
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team