Enabling and Configuring Disk Balancer Execution

By default, the disk balancer is disabled and can be enabled by setting the value of the parameter cldb.disk.balancer.enabled to 1. 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 enable and configure disk balancer:

Parameter Default Value Description
cldb.balancer.disk.paused 1

Specifies whether the disk space balancer runs:

  • 0 - Not paused (normal operation)
  • 1 - Paused (does not perform any container moves)
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:

  1. Enable disk balancer, change the default value of 0 to 1:
    maprcli config save {"cldb.disk.balancer.enabled":"1"}
  2. Increase the wait time to an hour, change the default value of 1800 seconds to 3600 seconds:
    maprcli config save {"cldb.balancer.startup.interval.sec":"3600"}
  3. 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 {"cldb.balancer.disk.sleep.interval.sec":"300"}