[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]
Turn off System.GC() ?  XML
Forum Index -> Ehcache
Author Message
puneetm

neo

Joined: 01/30/2013 11:24:37
Messages: 4
Offline

Hi Team,

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() ?

Thanks and Regards,
Puneet
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

What version of ehcache is this? I'm not aware of any explicit calls to System.gc() made from ehcache itself.

I don't know why you'd want to adjust your cache settings in response to any use of something like -XX:+DisableExplicitGC

Tim Eck (terracotta engineer)
puneetm

neo

Joined: 01/30/2013 11:24:37
Messages: 4
Offline

ehcache version - 1.4.1

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?
cdennis

master

Joined: 01/19/2009 10:03:26
Messages: 89
Offline

I suspect that the System.gc() calls are coming from the JVMs RMI implementation. You may find it informative to look at the following: http://docs.oracle.com/javase/6/docs/technotes/guides/rmi/sunrmiproperties.html

In particular the "sun.rmi.dgc.server.gcInterval" and "sun.rmi.dgc.client.gcInterval" properties.

Chris Dennis (Terracotta Engineer)
puneetm

neo

Joined: 01/30/2013 11:24:37
Messages: 4
Offline

This interval for GC to collect unreachable remote objects is 1 hour. But sometimes I can see explicit full GC getting run 5 times in 5 minutes.
cdennis

master

Joined: 01/19/2009 10:03:26
Messages: 89
Offline

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".

Chris Dennis (Terracotta Engineer)
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team