Repository navigation
Make the PG autoscaler bulk flag default for new pools - #61307
anthonyeleven wants to merge 1 commit into
Conversation
Signed-off-by: Anthony D'Atri <[email protected]>
|
jenkins retest this please |
|
Hi @anthonyeleven, Thank you for your work on this PR and for addressing the issue of PGs starting with a low count in out-of-the-box clusters. While the bulk flag provides a valuable mechanism to allocate PGs more dynamically, I believe it may still be too risky to make it the default for new pools. When the bulk flag is enabled, pools are allocated the maximum number of PGs based on their capacity relative to others in the cluster. While this approach ensures better utilization initially, it can lead to inactive PGs in large clusters. A notable issue arises when new pools are added: the recalculations of PGs by the autoscaler can cause older pools to scale down while the new ones scale up. This behavior has, in the past, disrupted stable clusters and led to operational challenges, especially with larger-size clusters. Given these risks, I recommend we continue to make the bulk flag an optional feature for now, and in the meantime, I can explore ways to minimize PG merges when we create new pools. Let me know what you think? |
|
I defer to your judgement. |
|
I put some additional thoughts here: Even just having rate be configurable instead of inferred would make programming the auto scaler to maximize a PG budget and proportion it between pools based on target ratios easier. Also, I think @dvanders had mentioned at dev summit leading up to Cephalocon that he thought the inactive / peering behavior might in fact be a bug. Dan, do you have a link to an issue relating to the inactive / peering issue that was being discussed at the summit? I feel like if we're not going over 100-250 per OSD and we're still seeing inactive/peering issues with PGs, then something is just wrong. |
|
Thanks @anthonyeleven @kamoltat @mmgaggle. My initial 2 second feedback is that even a simple change like this would need rethinking rgw_rados_pool_autoscale_bias and the cephfs meta pool bias defaults. And while I like the idea of starting with more PGs (because it sets up new clusters for optimal perf right out of the gate), I think there are several practical issues preventing this simple change. For example, my observation is that merging PGs is quite slow, even when they have very little data. I expect that bootstrapping a new cluster to take a long time, e.g.
I'd like to dig more into @mmgaggle 's high level view on things. When planning clusters, I find it much better to think about use-cases, and mixing use-cases, instead of pools, to come up with the right mix of how to spend the PG budget. Lastly - my final 2 cents - automatically changing pg_num live is just too scary in practice: the risk of a service interruption is too high imho. Somehow it should be opt-in, or scheduled. The example above shows one case where it's worth reviewing exactly when the autoscaler implements the changes. (Idea: a cooling-off period might fix the cluster bootstrapping issue I mentioned above). Proposal -- should we schedule design review discussion to find a consensus on how to improve pg autoscaling for T+? |
|
Absolutely, cogent insights. I’d already anticipated needed to disable splits during upgrades, especially an upgrade that first introduces the target increase in my other PR. I hadn’t thought of merging as going down seemed rare but then I’m not the typical Ceph admin. Agree about replacing one complexity with another. Clearly even after editing the docs I don’t fully grok the nuances. The behavior while creating pools didn’t occur to me but is a fantastic observation. I might have thought merges or splits on an empty cluster would be instantaneous, but of course pools get created at other times too, like at a prior job when RGW wasn’t in the initial deployment but the need for it appeared later. The autoscaler is a worthy usability idea and I’d love to see it kaizen. Maybe an approach to raise the floor without having pg_num default be impracticality high for tiny clusters. As a function of OSD count? Though that gets complicated with multiple device classes and complex topologies. |
|
The bulk flag appears to not behave as I thought it did, so barring additional feedback I'm closing this. |
Make the PG autoscaler bulk flag default for new pools.
There is support for this in the community to address the performance impact of low PG counts especially for index pools.
This complements #60492
The changes are tweaking docs and flipping the config option default value. Since the existing config option applies only to newly-created pools there will be no thundering herd of PG splits at upgrade time.
Signed-off-by: Anthony D'Atri [email protected]
@markhpc
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