Configure the off-heap BucketCache using Cloudera Manager

You can configure the off-heap BucketCache engine using Cloudera Manager.

  1. Go to the HBase service.
  2. Click the Configuration tab.
  3. Select the RegionServer scope and do the following:
    1. Set BucketCache IOEngine to offheap.
    2. Update the value of BucketCache Size according to the required BucketCache size.
      When you set the BucketCache Size, Cloudera Manager automatically sets the -XX:MaxDirectMemorySize JVM option for the RegionServers.

      Cloudera Manager automatically adds the JVM option -XX:MaxDirectMemorySize=<size> replacing <size> with a value not smaller than the off-heap BucketCache, expressed as a number of gigabytes + around 1GB used for HDFS short circuit read. For example, if the off-heap BucketCache is 16GB and the heap size is 15GB, the total value of MaxDirectMemorySize could be 32G: -XX:MaxDirectMamorySize=32G.

  4. Optionally, when combined BucketCache is in use, you can decrease the heap size ratio allocated to the L1 BlockCache, and increase the Memstore size. The on-heap BlockCache only stores indexes and Bloom filters, the actual data resides in the off-heap BucketCache. A larger Memstore is able to accommodate more write request before flushing them to disks.
    • Decrease HFile Block Cache Size to 0.3 or 0.2.
    • Increase Maximum Size of All Memstores in RegionServer to 0.5 or 0.6 respectively.
  5. Enter a Reason for change, and then click Save Changes to commit the changes.
  6. Restart or rolling restart your RegionServers for the changes to take effect.