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

Ask Your Question

Memory usage too high


We are seeing very high memory usage so we were wondering if we are doing something wrong.

I have the following class definition:

public class Sis implements Serializable {
    private static final long serialVersionUID = 6515221412507032733L;
    private String id;
    private String ssid;
    private String ssvid;
    private Timestamp day;
    private long lease;
    private Map<Date, Object> data;

And we have a dedicated grid to store objects of this type (14 GB for that grid). The only annotations we are using is SpaceId on the id field, and SpaceRouting on ssid.

In the data field we store usually around 288 entries, each of them consume around 56 bytes. We have measured that using the following method:


In total, each objects weights around 16 kb using Java (outside GigaSpaces). But when testing writing those object into the space, we see that the memory usage goes too high. For example, placing 288 entries of this type (16 kb each), we had a memory usage of 1 GB (after triggering GC). That would mean that each entry is taking around 378 kb. That would be 95% of overhead compared to the 16 kb we calculated without GigaSpaces. That seems too much to us. Is there something we are not doing in the correct way?

Please let me know if you need more information.



This thread was imported from the previous forum.
For your reference, the original is available here

asked 2011-07-27 14:15:31 -0500

dgaviola gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2011-07-27 15:53:03 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Sorry, discard this thread. We made a huge mistake when calculating the memory used. The test we were running was creating objects 10 times bigger than the ones we were measuring to compare against.


answered 2011-07-27 15:47:02 -0500

dgaviola gravatar image
edit flag offensive delete link more


Thanks Shay! The link was very useful


dgaviola gravatar imagedgaviola ( 2011-07-28 08:24:44 -0500 )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

1 follower


Asked: 2011-07-27 14:15:31 -0500

Seen: 45 times

Last updated: Jul 27 '11