Capacity and full-ratio planner
In the book: Chapter 7
Lab
Capacity and full-ratio planner
Give hosts, OSDs, the pool type and the data stored: see MAX AVAIL, which OSD sets that limit, and which OSDs a lost host pushes past nearfull, backfillfull and full.
72 TiBraw capacity in service
72 TiBraw space used
0 TiBMAX AVAIL of this pool
100.0%fullest OSD
- HEALTH_ERR OSD_FULL: 9 full OSD(s); writes to their pools stop
MAX AVAIL = min over OSDs ( (kb_avail − kb × (1 − full_ratio)) × 1024 / wi ) / raw_used_rate, wi = crush_weighti / Σ crush_weight · raw_used_rate = 3
OSD state: ratio > failsafe → FAILSAFE · > full → FULL · > backfillfull → BACKFILLFULL · > nearfull → NEARFULL
OSD state: ratio > failsafe → FAILSAFE · > full → FULL · > backfillfull → BACKFILLFULL · > nearfull → NEARFULL
MAX AVAIL comes from the OSD that is fullest for its weight, not from the average. One unbalanced OSD, or one bigger OSD in a small host, limits the whole pool; the balancer (chapter 8) and OSDs of equal size help most.
Follows:
src/mon/PGMap.cc :: get_rule_avail, dump_object_stat_sum (max_avail = avail / raw_used_rate)the smallest writable space divided by the weight sharesrc/crush/CrushWrapper.cc :: get_rule_weight_osd_map, _get_take_weight_osd_map, _normalize_weight_mapthe float weight of each OSD under the rule's takesrc/osd/OSD.cc :: OSDService::recalc_full_statethe order of the failsafe, full, backfillfull and nearfull checkssrc/osd/OSDMap.cc :: check_health (OSD_NEARFULL, OSD_BACKFILLFULL, OSD_FULL), pool_raw_used_ratethe health check names and raw_used_ratesrc/common/options/global.yaml.in :: mon_osd_nearfull_ratio (0.85), mon_osd_backfillfull_ratio (0.90), mon_osd_full_ratio (0.95), osd_failsafe_full_ratio (0.97)the default ratios