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

Ask Your Question
0

Gigaspaces SWAP mechanism

I am designing a raporting system using gigaspaces technology and I have a technical question: What will gigaspaces do if some of working spaces used all available RAM memory? Is there a mechanism built in gigaspaces which provide a hard drive cache when memory is full and write objects to disk?

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

asked 2008-10-08 06:18:56 -0500

slaveq gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

We support LRU eviction.
This means that all the data will be stored in database, and some of the data will be stored in memory. Objects from the space will be evicted based on available memory or max amount of objects.
In case you have a cache miss when you query the space, data will be loaded from the database.

The following are relevant here:
http://www.gigaspaces.com/wiki/display/XAP66/MemoryManagementFacility
http://www.gigaspaces.com/wiki/display/XAP66/Persistency

Please note that when performing queries and running with LRU mode , you might end up querying the database and not leveraging the space cache. The reason is simple:
If the space does not have enough objects as the maxobjects parameter specified as part of the space.readMultiple call , the space will try to query the database. This means you will need to specify a number that is not Integer.MaxValue here that is a bit tricky.

Some users (when using the External Data Source persistency mode) using the space.count operation (that count only the amount of objects in the space and not in the database) call and using its result as the max_objects parameter for the readMultiple call. This avoid the read from the database.

Shay

answered 2008-10-08 11:03:26 -0500

shay hassidim gravatar image
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

Stats

Asked: 2008-10-08 06:18:56 -0500

Seen: 48 times

Last updated: Oct 08 '08