Some more updates ... After several GC cycles, the heap suddenly decreased with no apparent reason, freeing all those ObjectID instances. So I took a deeper look at the server logs and the heap dumps: I noticed that the heap decreased after a cache eviction of just a few hundreds objects (which is strange given it previously evicted thousand objects with no result), so I took a look at the dumps and noticed that objects doesn't have all the same "weight". I mean, there are a few objects which seem to hold many other objects (ManagedObjectImpl), but the indirect references aren't held by the references map in the object manager, so they doesn't seem to count against the eviction. In other words, the "references_size()" method in ObjectManagerImpl doesn't seem to take into account indirect references, so the references size is apparently low, but the actual weight is pretty heavy.
I don't know if it makes any sense ... feel free to ask if you have any questions ... just take into account I'll be away in the next few days so I may answer with some delay. Cheers! Sergio B. On Mon, Nov 29, 2010 at 5:34 PM, Sergio Bossa <sergio.bo...@gmail.com> wrote: > Hi guys, > > while testing my Terracotta-based application I noticed that the > master almost saturates its memory (2 GB) with about 5 million map > entries, running as a consequence into more and more GC cycles. > By analyzing the heap dump I noticed there's a huge number of > com.tc.object.ObjectID instances, which is almost equal to the total > number of map entries: those objects seems to be retained by the > ObjectManagerImpl, and by looking at the source code it seems it > actually holds a map of reference objects. > > So, how does ObjectManagerImpl actually work? Doesn't it flush objects on > disk? > > -- > Sergio Bossa > http://www.linkedin.com/in/sergiob > -- Sergio Bossa http://www.linkedin.com/in/sergiob _______________________________________________ tc-dev mailing list tc-dev@lists.terracotta.org http://lists.terracotta.org/mailman/listinfo/tc-dev