bbeaudreault commented on PR #5104:
URL: https://github.com/apache/hbase/pull/5104#issuecomment-1472279584

   I downloaded `jol-core` and ran ClassLayout on RefCnt... On my platform, 24 
bytes without the boolean, 32 bytes with. Not insubstantial. Despite a boolean 
being just 1 byte, we lose 3 bytes on internal alignment and then another 4 
bytes on external/class alignment.
   
   So it's effectively like adding a long... I guess most ByteBufferAllocators 
are configured in the 10s of thousands, so not a huge issue there. RefCnt is 
also used in BucketCache where imagine this will only matter for very large 
bucket cache sizes? We give 75gb to bucket cache in some cases, which equals 
2-5M blocks. That'd be 40mb of space for us, which might be worth the 
performance tradeoff. If someone uses TB of file cache (i.e. when using object 
store like s3 for main storage), then it might be a lot more.
   
   This solution is equivalent in performance to my original memory-free 
solution for on-heap. The potential benefit is for off-heap, which I don't have 
performance numbers on. I might be inclined to keep my existing solution for 
now, until we can find any evidence for a regression in the off-heap case.
   
   Let me know if that changes your opinion at all before I merge this as-is.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to