System Administration
Also available as:
PDF

Compressing BlockCache

BlockCache compression caches data and encoded data blocks in their on-disk format, rather than decompressing and decrypting them before caching. When compression is enabled on a column family, this allows more data to fit into the amount of memory dedicated to BlockCache. Decompression is repeated every time a block is accessed, but the increase in available cache space can have a positive impact on throughput and mean latency.

BlockCache compression is particularly useful when you have more data than RAM allocated to BlockCache, but your compressed data would fit into BlockCache. (The savings must be worth the increased garbage collection overhead and overall CPU load).

If your data can fit into block cache without compression, or if your workload is sensitive to extra CPU or garbage collection overhead, we recommend against enabling BlockCache compression.

Block cache compression is disabled by default. To enable BlockCache compression:

  • Set hbase.block.data.cachecompressed to true in the hbase-site.xml file on each RegionServer.

  • Restart or rolling restart your cluster. Check logs for error messages.

[Important]Important

This feature requires compression to be enabled on the table. For more information, see Enable Compression on a ColumnFamily.