Updated on 2024-05-29 GMT+08:00

Enabling the HBase Compaction

Scenario

HBase allows you to set compaction throughput during off-peak hours. A large throughput can speed up compaction execution and reduce impacts on services during peak hours.

(This operation is supported only for MRS 3.3.0 or later.)

Configuring HBase Compaction Throughput Parameters

Log in to FusionInsight Manager, choose Cluster > Service > HBase, and click Configuration. In the search box, search for the parameters listed in Table 1 and change the parameter values as you need. The parameter settings take effect dynamically. After the modification is saved, log in to the hbase shell CLI and run the update_all_config command to update the configuration. You do not need to restart the instance.

To enable the HBase compaction throughput settings, neither hbase.offpeak.start.hour nor hbase.offpeak.end.hour must be -1.

Table 1 HBase compaction throughput parameters

Parameter

Description

Default Value

hbase.offpeak.start.hour

Start time of off-peak hours of the HBase cluster. The value must be an integer from -1 to 23. If the value is -1, HBase compaction throughput will not be used.

-1

hbase.offpeak.end.hour

End time of off-peak hours of the HBase cluster. The value must be an integer from -1 to 23. If the value is -1, HBase compaction throughput will not be used.

-1

hbase.hstore.compaction.throughput.offpeak

Compaction throughput during off-peak hours. The unit is byte/s.

104857600

Configuration Example

  1. Log in to FusionInsight Manager, choose Cluster > Service > HBase, and click Configuration. Set off-peak hours as needed. The following are examples:

    • If hbase.offpeak.start.hour is 18 and hbase.offpeak.end.hour is 23, off-peak hours are 18:00 to 23:00 every day.
    • If hbase.offpeak.start.hour is 23 and hbase.offpeak.end.hour is 8, off-peak hours are 23:00 to 8:00 the next day.

  2. During off-peak hours, log in to FusionInsight Manager, choose Cluster > Service > HBase, and click Chart. Check whether the value of Compaction Queue Size-All Instances keeps increasing and whether the values of some RegionServers in Traffic of the RegionServer Compaction Operations-All Instances have reached or exceeded the value of hbase.hstore.compaction.throughput.offpeak.

    • If they are, set hbase.hstore.compaction.throughput.offpeak to a larger value based on the cluster disk usage and go to 3.
    • If they are not, no further action is required.

  3. Check whether the value of P99 Percentile RegionServer RPC Request Response Time-All Instances keeps increasing in the HBase chart.

    • If it does, go to 4.
    • If it does not, no further action is required.

  4. Check whether the value of Disk IO Utilization of the host where the RegionServer is located exceeds 90%.

    • If it does, reduce the write speed or expand the disk capacity.
    • If it does not, no further action is required.