[ https://issues.apache.org/jira/browse/HBASE-27891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791650#comment-17791650 ]
Wellington Chevreuil commented on HBASE-27891: ---------------------------------------------- Are you guys currently working on this, [~bbeaudreault]? As our cloud storage solution strongly relies on bucket cache for performance, we are very interested on this. {quote}For example, we have a server with 500k blocks in the bucket cache, and according to a heap dump it was holding around 260mb {quote} Yep. Pay special attention to blocks sizes if you are using compression. This is because by default, we consider the uncompressed size when delimiting a block, so we may reach the configured size (say, the default 64KB), then compress it and write to disk. In some of our customer's deployments, this was resulting in blocks as small as 5KB, thus increasing the number of blocks (and therefore, the number of objects held by BucketCache in the RSes' heaps). We had implemented the BlockCompressedSizePredicator to mitigate this in HBASE-27264, with the PreviousBlockCompressionRatePredicator that calculates the compression ratio of previous block, when considering what should be the raw size boundary. {quote}The major contributors I saw were the offsetLock, blocksByHFile set, and backingMap. {quote} We also recently found potential leak on blocksByHFile. Mostly fixed by HBASE-26305, but if you are on a version that doesn't include this, you might face this problem. HBASE-26305 on its own doesn't solve potential leaks in the case of allocation failures, so we also had submitted HBASE-28211 for this. > Report heap used by BucketCache as a jmx metric > ----------------------------------------------- > > Key: HBASE-27891 > URL: https://issues.apache.org/jira/browse/HBASE-27891 > Project: HBase > Issue Type: Improvement > Reporter: Bryan Beaudreault > Priority: Major > > The BucketCache can take a non-trivial amount of heap, especially for very > large cache sizes. For example, we have a server with 500k blocks in the > bucket cache, and according to a heap dump it was holding around 260mb. One > needs to account for this when determining the size of heap to use, so we > should report it. > The major contributors I saw were the offsetLock, blocksByHFile set, and > backingMap. -- This message was sent by Atlassian Jira (v8.20.10#820010)