Configuring Disk Balancer Execution

Explains how to tune the disk balancer execution parameters.

Even when the disk balancer is enabled, the disk balancer waits during cluster startup to give enough time for the cluster to settle down. The default wait time (specified in seconds) is 30 minutes and can be changed using the parameter cldb.balancer.startup.interval.sec. After every run, the disk balancer pauses for 2 minutes by default. The pause time (specified in seconds) can be increased through the parameter cldb.balancer.disk.sleep.interval.sec.

Run the maprcli config save command and set the following parameters to configure disk balancer:

Parameter Default Value Description
cldb.balancer.startup.interval.sec 1800 seconds Wait time, in seconds, for cluster startup.
cldb.balancer.disk.sleep.interval.sec 120 seconds Interval, in seconds, between disk balancer runs.

For example, to:

  • Increase the wait time to an hour, change the default value of 1800 seconds to 3600 seconds:
    maprcli config save -values {"cldb.balancer.startup.interval.sec":"3600"}
  • Increase the pause time between disk balancer runs from 2 minutes to 5 minutes, change the default value of 120 seconds to 300 seconds:
    maprcli config save -values {"cldb.balancer.disk.sleep.interval.sec":"300"}

Preventing Volume Skew

By default, the disk balancer does not consider volume skew while moving containers out of a Storage Pool (SP). In the process, all containers of a volume may end up on only a few SPs. Such a volume skew is undesirable, specifically, for DB volumes. In such a skew, few servers handle all requests, resulting in reduced performance.

To prevent volume skew, set the prevent.volume.skew.by.diskbalancer parameter to true as follows:

maprcli config save -values {"prevent.volume.skew.by.diskbalancer":"true"}

This parameter checks whether moving a container out of a SP causes a volume skew elsewhere.

NOTE
Enabling this parameter may result in containers failing the volume underweight check and failing to be moved from a full SP. Consider this limitation and enable as per your need.