Ceph Upmap Balancer Lab
Contents
Introduction⌗
Using the Ceph Octopus lab setup previously with RadosGW nodes, this will attempt to simulate a cluster where OSD utilisation is skewed. In the cluster, each node has an extra 50G OSD to help try and skew the usage percentages on the OSDs.
This is the current configuration of the cluster

This all comes from this video, a highly recommenced watch, from Cephalocon 2019
Test Setup⌗
In summary, the cluster will have data added to it using s3cmd. There will be two buckets created, one for ISO’s and other large images, and another for loads of photos and other small files. This should take the cluster to roughly 60% capacity.
Requirements⌗
- Ensure the Ceph balancer is off
- Expected output
Setup s3cmd⌗
- Install s3cmd
- Configure s3cmd to connect to the cluster using the keys created in this previous step
Modify ~/.ceph_s3cfg
as required. Alternatively modify ~/.s3cfg
if this will be the only cluster s3cmd will connect to.
- Create two buckets
Seed Test Data⌗
- Sync local directories via s3cmd
This will probably take a while, depending on the amount of data, speed of the Ceph drives etc. May be useful to setup a custom Grafana Dashboard to ensure Upmap is working as intended
- Check files are accessible
- Check the size of the buckets
Setup Custom Grafana Dashboard⌗
Using either the default Grafana setup or the monitoring set up here, log into Grafana as admin
- Import a new dashboard from this JSON
- The new dashboard should look something like this

Enable the Upmap Balancer⌗
Steps below will be following the instructions from Ceph docs to enable the Upmap balancer.
Current State of the Cluster⌗
As the first image shows, there are 2 OSDs at over 90% utilisation. with the lowest utilised OSD at 23%


- Most utilised OSDs
- Least utilised OSDs
- Standard deviation is at 19.19
Starting the Upmap Balancer⌗
- Check
min_compat_client
- Update
min_compat_client
if it is less then luminous
If there are pre-luminous clients connecting to the cluster this will cause issues.
- Set the balancer mode to
upmap
- Confirm this has been setup
Expected output
Start the balancer
- Check the balancer is running
- Expected output
At this point the cluster will start rebalancing data.
ceph -s
will show pgs being remapped to optimise data placement. The grafana graph should start to show the OSD utilisation percentages averaging out.
- Once the balancer has completed, it will show a message similar to below. All I/O was stopped on the cluster overnight while it rebalanced so if this isn’t the case it is likely the balancer will continue balancing data.
- Output
Summary⌗
Data utilisation across the OSDs is a lot healthier. Considering the size differences in the drives, this is pretty good. Highest utilisation is 65%, lowest is 31%.

Considering it unlikely that there would be drives 10x larger than others in the same CRUSH hierarchy in a production environment, balancing this lab cluster was very efficient. A future lab will take look into the crush-compat balancer mode and compare the balancing effect on this cluster.
To clean up this lab, use the script here.