mgr/balancer: optimize 'balancer status detail'#60523
Merged
Conversation
83ee4df to
a62708f
Compare
added 3 commits
November 1, 2024 22:50
Before, we were updating the balancer status by iterating through all pg upmap entires. This was affecting the loading time of other mgr modules on clusters with a large number of pgs (600+). This can be optimized by simply pulling from the incremental. Fixes: https://tracker.ceph.com/issues/68657 Signed-off-by: Laura Flores <lflores@ibm.com>
This addition gives users the option of enabling/disabling this feature. They can do so by running: ceph config set mgr mgr/balancer/update_pg_upmap_activity <True|False> The feature is off by default. Signed-off-by: Laura Flores <lflores@ibm.com>
Signed-off-by: Laura Flores <lflores@ibm.com>
a62708f to
c4274c0
Compare
anthonyeleven
approved these changes
Nov 1, 2024
Member
Author
|
jenkins test api |
Member
Author
|
jenkins test make check |
Member
Author
|
jenkins test make check arm64 |
rzarzynski
approved these changes
Nov 13, 2024
| self.pg_upmap_items_added = [pg for pg in osdmap.dump().get('pg_upmap_items', '') if pg not in self.last_pg_upmap] | ||
| self.pg_upmap_items_removed = [pg for pg in self.last_pg_upmap if pg not in osdmap.dump().get('pg_upmap_items', '')] | ||
| self.last_pg_upmap = osdmap.dump().get('pg_upmap_items', '') | ||
| self.pg_upmap_items_added = incdump.get('new_pg_upmap_items', []) |
| r, detail = self.execute(plan_) | ||
| self.update_pg_upmap_activity(plan_) # update pg activity in `balancer status detail` | ||
| pg_upmap_activity = cast(bool, self.get_module_option('update_pg_upmap_activity')) | ||
| if pg_upmap_activity: |
Contributor
There was a problem hiding this comment.
I guess this commit alone would be enough to pacify the issue...
Do we have a plan ti re-enable the command (by default)?
Member
Author
There was a problem hiding this comment.
This is a new feature in Squid, so I think it makes sense to disable it for now until testing can confirm that it can handle scalability. Then, we can enable it by default.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before, we were updating the balancer status by
iterating through all pg upmap entires. This was
affecting the loading time of other mgr modules
on clusters with a large number of pgs (600+).
This can be optimized by simply pulling from
the incremental.
Fixes: https://tracker.ceph.com/issues/68657
This PR also ties "ceph balancer status detail"
to a configurable. To test out the configurable,
you can run
ceph config set mgr mgr/balancer/update_pg_upmap_activity <True|False>.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 retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e