Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Memory Management clarification

Looking at this [ http://www.gigaspaces.com/wiki/displa... ] , it's not immediately clear how the watermarks are calculated. Depending on the GC tuning parameters, it could mean different things. Are the watermark percentages calculated against the entire heap size or the size of old generation? Calculating from the old gen seems to make more sense to me because it is a more precise estimate of the available resources, where the size of the young generation tends to fluctuate.

Finally, are there any recommendations on how to tune these values? To me it seems the defaults are too conservative especially for larger deployments.


{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2746]{quote}

asked 2008-12-02 12:55:00 -0500

larrychu's avatar

updated 2013-08-08 09:52:00 -0500

jaissefsfex's avatar
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

The memory utilization percentage calculated using:
(Runtime.totalMemory() - Runtime.freeMemory() ) * 100

When running in LRU mode you should remember the following:
Since the JVM GC release its memory in a gradual manner and report the free memory with some delay the above calculation might not be 100% accurate. In some cases when you have a system that is writing new data into the space in very fast rate you might want to use the cache_size as the primary parameter to be used to evict objects from the space and the memory usage as the secondary eviction strategy.

The main difference between the eviction that kicks in based on cachesize parameter compared to the one using the memory usage parameters is the amount of evicted objects. With the cachesize based eviction mechanism , GigaSpaces engine evicts one object in a time where with the memory usage it is done in batches. This means the cache_size based eviction might be more deterministic.

The values illustrated at the http://www.gigaspaces.com/wiki/display/XAP66/MemoryManagementFacility - How can I Get Deterministic Behavior During Eviction? - Section might be aggressive. You may obviously tune these to be less aggressive in case you have a system with less demanding throughput rate. This means you can have higher highwatermarkpercentage (which means also higher writeonlyblockpercentage , writeonlycheckpercentage and lowwatermarkpercentage) and smaller evictionbatchsize and retryyieldtime. You can also change the XX:MaxGCPauseMillis and the -Xmn to have better values.


answered 2008-12-03 11:55:02 -0500

shay hassidim's avatar
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2008-12-02 12:55:00 -0500

Seen: 126 times

Last updated: Dec 03 '08