My application uses eHcache and we don't use diskstore for cache. All goes into memory.
We have 8 jboss instances on 2 physical servers.
4 jboss instances on 1 physical server runs fine without any issues.
4 jboss instances on 2nd physical server after runing 2-3 days start slowing down and blocking server threads.
What I have observed is application always runs system.gc(). No normal full GC runs. And I think its ehcahce library which runs it.
My question is is there any impact of turning explicit GC off to eHcache. We use RMI to replicate cahce among servers.
Currently max elements are set to 500000. Should I increase this value if we plan to turn off explicit GC() ?
I am not changing settings of ehcache. I am not fully aware of internal working of ehcache. What I assumed is when 500000 elements space is full ehcache either get rid of object using LRU or call a system.gc(). I am not sure which third party library is calling system.gc as its not getting called by code written by me. Just want to confirm is there any impact to ehcache if explicit GC is tuned off?
I've looked in the 1.4.1 source code and the code in that release doesn't call System.gc(). I don't know of any reason why disabling it would cause any problems with Ehcache - however modifying the GC behavior in any environment is always going to change behavior in some way (noticeable or not). That is going to be especially true for a system that is using RMI. I think the basic answer here is that Ehcache shouldn't be adversely affected - but other aspects of your system might be. In short you're probably going to have to "suck it and see".