Supervised optimization

Break down the balancer operations in a phased manner.

About this task

The balancer operation is broken into a few distinct phases.

Procedure

  1. Build a plan.
  2. Evaluate the quality of the data distribution, either for the current PG distribution, or the PG distribution that might result after running a plan.
  3. Run the plan.
    1. Evaluate and score the current distribution.

      ceph balancer eval
    2. Evaluate the distribution for a single pool.
      ceph balancer eval POOL_NAME
      For example,
      [ceph: root@host01 /]# ceph balancer eval rbd
    3. See a greater detail for the evaluation.
      ceph balancer eval-verbose ...
    4. Generate a plan using the currently configured mode.
      ceph balancer optimize PLAN_NAME

      Replace PLAN_NAME with a custom plan name.

      For example,
      [ceph: root@host01 /]# ceph balancer optimize rbd_123
    5. See the contents of a plan.
      ceph balancer show PLAN_NAME
      For example,
      [ceph: root@host01 /]# ceph balancer show rbd_123
    6. Discard old plans.
      ceph balancer rm PLAN_NAME
      For example,
      [ceph: root@host01 /]# ceph balancer rm rbd_123
    7. See currently recorded plans use the status command.
      ceph balancer status
    8. Calculate the quality of the distribution that would result after executing a plan.
      ceph balancer eval PLAN_NAME
      For example,
      [ceph: root@host01 /]# ceph balancer eval rbd_123
    9. Run the plan.
      ceph balancer execute PLAN_NAME
      For example,
      [ceph: root@host01 /]# ceph balancer execute rbd_123
      Note: Only run the plan if it is expected to improve the distribution. After execution, the plan is discarded.