this is how I tested it: 1) load cache with 1.500.000 entries 2) execute fill gc 3) mesure heap size (using visual vm) 4) execute flush row cahce over cli 5) execute full gc 6) and again mesure hap usage
The difference between 6) and 3) is the heap size used by cache On Fri, Oct 28, 2011 at 3:26 PM, Peter Schuller <peter.schul...@infidyne.com > wrote: > > Is it possible, that single row (8 columns) can allocate about 2KB heap? > > It sounds a bit much, though not extremely so (depending on how much > overhead there is per-column relative to per-row). Are you definitely > looking at the live size of the heap (for example, trigger a full GC > and look at results) and not just how much data there happens to be on > the heap after your insertion? > > In any case, if you are looking for better memory efficiency I advise > looking at the off-heap row cache > ( > http://www.datastax.com/dev/blog/whats-new-in-cassandra-1-0-improved-memory-and-disk-space-management > ). > It is suposed to be enabled by default. If it's not, do you have JNA > installed? > > The reason I say that is that the off-heap cache stores serialized > information on the heap rather than the full tree of Java objects. If > off-heap caching is enabled, 2 kb/row key would be far far more than > expected (unless I'm missing something, I've actually yet to actually > measure it myself ;)). > > -- > / Peter Schuller (@scode, http://worldmodscode.wordpress.com) >