On 12/16/2011 10:13 PM, Brandon Williams wrote:
On Fri, Dec 16, 2011 at 8:52 PM, Kent Tong<freemant2...@yahoo.com>  wrote:
Hi,

 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?
In a word: java.

-Brandon


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)

Reply via email to