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

Ask Your Question
0

Gigaspace Map Memory Footprint

Hi,

I am using Gigaspace Map API to store a document as a key value pair. My value is a serialized/compressed byte array of a complex object and the key is a UUID. (key -> Byte Array)

Looking into the Gigaspace Admin UI, my byte array is of average 600 bytes, and my UUID is on average ~35 bytes. If I am not wrong, there would be an index on the key and a Gigaspace generated UUID ~54 bytes. Adding up this my one object should not be more than 700 bytes.

Now, I pushed in 100,000 records into the grid, which took nearly 140 MB, but based on my calculation above, it should not take more than 66 MB.

Where is the overhead coming into this, as this is causing a huge memory footprint nearly doubling for small compressed objects of < 1KB.

asked 2014-06-26 08:32:01 -0600

Love gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Have you called gc before calculating the footprint?

The very basic overhead per object is around 150 bytes. GigaMap object has some additional small footprint.

The GigaSpace API will provide bit better footprint.

This should help: http://docs.gigaspaces.com/sbp/cache-...

You probably don't need the region field.

Shay

answered 2014-06-26 08:45:16 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Yes, I called in the GC before and after the observations to collect the best possible results.

Also, since the values we are storing are comparatively small in say 600 bytes, the 150 bytes overhead adds up a lot. Is there any away to avoid this overhead at the cost of some lower level API's or manual processing.

Also, I have seen UUID being generated even though I have specified a key. Can't that be avoided as well. That will save me 53 bytes.

Love gravatar imageLove ( 2014-06-26 09:31:32 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2014-06-26 08:32:01 -0600

Seen: 404 times

Last updated: Jun 26 '14