mClock profiles: client, recovery and background shares
In the book: Chapter 7
mClock profiles: client, recovery and background shares
Pick the device, the profile and each class's load, and see how one OSD queue shard splits its capacity between clients, recovery and background work such as scrub, and why a 4 KiB op on an HDD is charged like half a megabyte.
| res | wgt | lim | Cost per op | Ops/s wanted | Ops/s served | Share of the shard | |
|---|---|---|---|---|---|---|---|
| Client | 50.0% | 1 | ∞ | 487.62 KiB | 300 | 150 | 47.6% |
| Recovery | 50.0% | 1 | ∞ | 4 MiB | 30 | 18 | 47.6% |
| Best effort (scrub, …) | 5.0% | 2 | 90.0% | 4 MiB | 10 | 2 | 4.8% |
The reservations in use add up to more than the capacity (in high_client_ops they sum to 105%), so only the reservation phase runs and each class gets a share in proportion to its reservation.
Replace the IOPS with your device's real figure (the osd bench result): if it is too high, cost_per_io shrinks, mClock thinks small ops are cheap and the shares stop protecting clients. To speed up recovery after a failure, switch to high_recovery_ops for a while and then switch back (chapter 7).
Follows:
src/common/mclock_common.h :: HIGH_CLIENT_OPS, HIGH_RECOVERY_OPS, BALANCEDThe three profiles' valuessrc/common/mclock_common.cc :: ClientRegistry::update_from_profile, MclockConfig::set_from_config, calc_scaled_costRatios to bytes/s and the cost of one opsrc/dmclock/src/dmclock_server.h :: PullPriorityQueue::pull_request, reduce_reservation_tagsThe dmClock schedulersrc/common/options/osd.yaml.in :: osd_mclock_max_capacity_iops_*, osd_mclock_max_sequential_bandwidth_*, osd_op_num_shards_*Capacity and shard options