cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent Tong <>
Subject memory estimate for each key in the key cache
Date Sat, 17 Dec 2011 02:52:57 GMT

From the source code I can see that for each key, the hash (token), the key itself (ByteBuffer)
and the position (long. offset in the sstable) are stored into the key cache. The hash is
an MD5 hash, so it is 16 bytes. So, the total size required is at least 16+size-of(key)+4
which is > 20 bytes. If we consider the overhead of the object references, then it will
be even larger. Then, why the wiki recommends multiplying the  number of keys cached with
10-12 to get the memory requirement?

Thanks for any idea!

View raw message