merlimat opened a new pull request #821: Use ConcurrentLongLongHashMap in 
EntryLogMetadata
URL: https://github.com/apache/bookkeeper/pull/821
 
 
   Porting commits 
https://github.com/yahoo/bookkeeper/commit/74afc16d1c1e93739edf4a78801c5ccb6afd3883
 and 
https://github.com/yahoo/bookkeeper/commit/eba3bbfbbaf58118c0c5736b56d3897a5928bc89
 from Yahoo branch. 
   
   Currently the `EntryLogger` is keeping a `ConcurrentHashMap<Long, Long>` to 
keep track of amount of data stored in a single entry log file for each of the 
ledgers. 
   
   The amount of memory required is high because of the objects boxing. The 
`Long` used for key and value are 16 bytes each and the hash-map node will take 
another ~24 bytes. 
   
   Additionally, all these objects are created, stored for hours and then GCed, 
after being tenured. 
   
   By using `ConcurrentLongLongHashMap`, we eliminate the object boxing and the 
need for the "node" since it's a open hashmap. This helps reducing a lot the 
memory used by the bookie when storing a large amount of entries (54 --> 16 
bytes).
   Also since we store the items in `long[]`, this will not need objects and it 
will not affect GC.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to