Repository navigation
Mgr: Allow autoscaling for overlapped roots - #68532
Conversation
1784185 to
3df3c6a
Compare
|
Fix mypy build error |
3df3c6a to
429eed9
Compare
kamoltat
left a comment
There was a problem hiding this comment.
I approved the code changes for this. However, we are missing some documentation changes in: doc/rados/operations/placement-groups.rst. In Automated scaling section we should remove the mention of overlapping roots and failing to scale. Instead we should include a section that explains the autoscaler logic when there are more than 1 roots that overlaps in terms of OSDs and how pg_target are distributed based on ratio.
We also might want to add a ceph/PendingReleaseNotes
something like
- RADOS: pg autoscaler allow overlapped roots, each root will be given a pg_target based on the number of OSDs under the root relative to other roots.
| @@ -709,7 +697,7 @@ def _calculate_final_pool_pg_target( | |||
| final_ratio = 1 / (pool_count - root_map[root_id].pool_used) | |||
| for (pg_target, size, bias, bulk, autoscale), group in pool_group.items(): | |||
| pg_target = int(final_ratio * root_map[root_id].pg_left) | |||
| self.log.debug("updating group with target {} size {} bias {} bulk {} autoscale {}".format(pg_target, size, bias, bulk, autoscale)) | |||
| self.log.info("updating group with target {} size {} bias {} bulk {} autoscale {}".format(pg_target, size, bias, bulk, autoscale)) | |||
There was a problem hiding this comment.
should we keep the log to debug level? I'm just worried about polluting the mgr logs if we go info level
There was a problem hiding this comment.
Changed this back to debug
| for osd, root_ids in osd_uses_by_root.items(): | ||
| for root_id in root_ids: | ||
| result[root_id].pg_target += self.mon_target_pg_per_osd // len(root_ids) |
There was a problem hiding this comment.
Ack the math checks out, here is how I validate it:
mon_target_pg_per_osd = 300
rootid -1 : {0, 1, 2, 3}
rootid -2 : {0, 1}
rootid -3 : {2, 3}
0: {-1, -2}
1: {-1, -2}
2: {-1, -3}
3: {-1, -3}
result: [-1: pg_target: 150 , -2: 150 , -3: 0]
result: [-1: pg_target: 300, -2: 300, -3: 0]
result: [-1: pg_target: 450, -2: 300, -3: 150]
result: [-1: pg_target: 600, -2: 300, -3: 300]
600 + 300 + 300 = 1200
mon_target_pg_per_osd * (num_osds) = 300 * 4 = 1200
Therefore, we are actually allocating the pg_target for each roots based on the OSDs that are under
|
@Ericmzhang can you test creating the 4 crush rules If the atuoscaler still works with these crush rules |
051d690 to
a9d9892
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
a9d9892 to
e7c9de9
Compare
Added test in qa/workunits/mon/pg_autoscaler.sh |
|
Made changes for review above. Removed overlapped roots failure mention in docs and added example of budgeting with overlapped roots. |
anthonyeleven
left a comment
There was a problem hiding this comment.
Docs lgtm with one suggestion.
| .. _overlapping_crush_roots: | ||
|
|
||
| Overlapped CRUSH Roots PG Budget | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Nit: suggest s/Overlapped/Overlapping/
this is minor. Same in the pending release notes.
Less minor is that I think the ~~ line is one char too long.
d716c2d to
ab40fbe
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
ab40fbe to
9e39c27
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
7b95255 to
8860431
Compare
|
rebase from main |
|
(just a little reminder: fixups need to be squashed before the merge and the signed-off-by check must pass). |
308ec43 to
0e0d30e
Compare
Remove references to overlapped roots. Assign PG budget per root as sum(mon_target_pg_per_osd/# roots that contain OSD) Fixes: https://tracker.ceph.com/issues/73892 Signed-off-by: Eric Zhang <[email protected]>
No longer need to detect which roots are overlapping. Instead test PG budget allocation when roots overlap Fixes: https://tracker.ceph.com/issues/73892 Signed-off-by: Eric Zhang <[email protected]>
Remove mention of overlapped roots failing to scale and added example of adding overlapped roots. Added mention of changes in PendingReleaseNotes Fixes: https://tracker.ceph.com/issues/73892 Signed-off-by: Eric Zhang <[email protected]>
Added overlapped roots test case for CRUSH rules
rule zone-1-only
step take zone us-east-1
step chooseleaf firstn 3 type host
step emit
rule zone-2-only
step take zone us-east-2
step chooseleaf firstn 3 type host
step emit
rule zone-3-only
step take zone us-east-3
step chooseleaf firstn 3 type host
step emit
rule default
step take default
step chooseleaf firstn 3 type host
step emit
and osd tree
-1 6.00000 root default
-8 6.00000 region us-east
-5 2.00000 zone us-east-1
-13 1.00000 host host0
0 ssd 1.00000 osd.0
-14 1.00000 host host1
1 ssd 1.00000 osd.1
-6 2.00000 zone us-east-2
-15 1.00000 host host2
2 ssd 1.00000 osd.2
-16 1.00000 host host3
3 ssd 1.00000 osd.3
-7 2.00000 zone us-east-3
-17 1.00000 host host4
4 ssd 1.00000 osd.4
-18 1.00000 host host5
5 ssd 1.00000 osd.5
-1: pg_target = 300
-5: pg_target = 100
-6 pg_target = 100
-7: pg_target = 100
Fixes: https://tracker.ceph.com/issues/73892
Signed-off-by: Eric Zhang <[email protected]>
0e0d30e to
7f9e383
Compare
|
Squashed fixups |
|
jenkins test make check arm64 |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
Use the first take step of each in-use rule as its root, as the mgr does, so multi-take rules (ssd-primary) are not flagged against themselves. Report each overlapping pair with the rules and pools on each side and the corrective action. Gate on Pacific through Squid; from Tentacle the autoscaler budgets PGs across shared OSDs instead (ceph/ceph#68532). Reword the log-based conclusion to match and let the crush dump one take precedence. Add tentacle to the release tables, drop the unused crush tree command, and give the crush dump fixtures full bucket data. Signed-off-by: Dan Hill <[email protected]>
Use the first take step of each in-use rule as its root, as the mgr does, so multi-take rules (ssd-primary) are not flagged against themselves. Report each overlapping pair with the rules and pools on each side and the corrective action. Gate on Pacific through Squid; from Tentacle the autoscaler budgets PGs across shared OSDs instead (ceph/ceph#68532). Reword the log-based conclusion to match and let the crush dump one take precedence. Add tentacle to the release tables, drop the unused crush tree command, and give the crush dump fixtures full bucket data. Signed-off-by: Dan Hill <[email protected]>
Use the first take step of each in-use rule as its root, as the mgr does, so multi-take rules (ssd-primary) are not flagged against themselves. Report each overlapping pair with the rules and pools on each side and the corrective action. Gate on Pacific through Squid; from Tentacle the autoscaler budgets PGs across shared OSDs instead (ceph/ceph#68532). Reword the log-based conclusion to match and let the crush dump one take precedence. Add tentacle to the release tables, drop the unused crush tree command, and give the crush dump fixtures full bucket data. Signed-off-by: Dan Hill <[email protected]>
Use the first take step of each in-use rule as its root, as the mgr does, so multi-take rules (ssd-primary) are not flagged against themselves. Report each overlapping pair with the rules and pools on each side and the corrective action. Gate on Pacific through Squid; from Tentacle the autoscaler budgets PGs across shared OSDs instead (ceph/ceph#68532). Reword the log-based conclusion to match and let the crush dump one take precedence. Add tentacle to the release tables, drop the unused crush tree command, and give the crush dump test data full bucket fields. Signed-off-by: Dan Hill <[email protected]>
Use the first take step of each in-use rule as its root, as the mgr does, so multi-take rules (ssd-primary) are not flagged against themselves. Report each overlapping pair with the rules and pools on each side and the corrective action. Gate on Pacific through Squid; from Tentacle the autoscaler budgets PGs across shared OSDs instead (ceph/ceph#68532). Reword the log-based conclusion to match and let the crush dump one take precedence. Add tentacle to the release tables, drop the unused crush tree command, and give the crush dump test data full bucket fields. Fixes canonical#1139. Signed-off-by: Dan Hill <[email protected]>
Problem:
Solution:
Fixes: https://tracker.ceph.com/issues/73892
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.