cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Incognito <>
Subject Re: memory estimate for each key in the key cache
Date Mon, 19 Dec 2011 00:37:13 GMT
to be blunt, this doesn't sound right to me, unless it's doing something 
rather more clever to manage the memory.

i mocked up a simple class containing a byte[], ByteBuffer and long, and 
the shallow size alone is 32 bytes.  deep size with a byte[16], 1-byte 
bytebuffer and long is 132.  this is a on a 64-bit jvm on win x64, but 
is consistent(ish) with what i've seen in the past on linux jvms.  the 
actual code has rather more objects than this (it's a map, it has a 
pair, decoratedKey) so would be quite a bit bigger per key.

On 17/12/2011 03:42, Brandon Williams wrote:
> On Fri, Dec 16, 2011 at 9:31 PM, Dave Brosius<>  wrote:
>> Wow, Java is a lot better than I thought if it can perform that kind of
>> magic.  I'm guessing the wiki information is just old and out of date. It's
>> probably more like 60 + sizeof(key)
> With jamm and MAT it's fairly easy to test.  The number is accurate
> last I checked.
> -Brandon

View raw message