Repository navigation
src/common/options: Increase autoscaler PG target and overload values - #60492
Conversation
|
In general I'm for this, with the caveat that at very large OSD counts it could cause certain problems to show up faster. I'd like to see us turn pglog length into a per-pool attribute and control it through the priority cache. Also adjust the pg stat update interval for the mgr based on latency. The end goal would be to allow for a high initial count of PGs per OSD and only perform pg autoscaling when we exceed some boundary conditions that can't be solved via other mechanisms. |
Thanks. Re the last sentence, that sounds like the Re the first through third sentences, do you have a sense of how large pglogs are? Are talking additional tens of MB memory per OSD? Hundreds of MB? My gut wants to set both of these values twice again higher but I thought it prudent to be conservative. |
Sadly in the case of erasure coding with xattrs or (maybe? I need to check) OMAP it appears to be unbounded. We hit this last year and it was particularly rough. We had to set the pglog size to 1 just to avoid having OSDs go OOM in a particularly nasty corner case. Typically however, I'd expect between 10s-100s of MB depending on how many PGs we target. This is why I want to change PG log to be per-pool and based on a memory target rather than a hard count. It kills two birds with one stone as the saying goes. |
|
Do you think this is mergeable for now? |
727bd1c to
0cbbcfa
Compare
|
bump |
|
jenkins retest this please |
3 similar comments
|
jenkins retest this please |
|
jenkins retest this please |
|
jenkins retest this please |
|
@rzarzynski I can approve this, but I want to make sure we get any dissenting views into the discussion before doing so. Is there anyone on core that would like to give feedback before we move forward? One potential change I would like to make is to reduce the pglog size in conjuction with increasing the PG log count. We should note that this will hit the mgr harder with stat updates, but I think it's still a good change overall. |
|
I'm also looking into ensuring that the autoscaler doesn't kick in during an upgrade that effects this change, as that could be disruptive and conceivably significantly draw out the elapsed time to upgrade. |
|
I'm good with merging this PR since I don't see any risks associated with PGs misbehaving due to this change with any cluster size. mon_target_pg_per_osd --> This is used to calculate the total amount of PGs we target for the cluster (PG budget at the start of autoscaler module). It is used in conjunction with mon_max_pg_per_osd --> This won't affect the autoscaler module directly, but more of MON and OSD code, basically allowing for more PGs per OSDs. |
Hi @markhpc I would love to discuss the pglog route, although I have to admit my knowledge of PG logs is limited, will read on this and maybe we can have a better discussion after I educate myself. |
|
Thanks, Kamoltat.
I thought this defines the autoscaler's target for the number of PG replicas per OSD, aka PG ratio, the PGS column at extreme right of
Yep. But it should be raised in conjunction with the PG ratio target, as more PG replicas per OSD will mean an increased chance that a topology change, notably the loss of a host or other failure domain, will run up the PG replica count on some OSDs above the limit, resulting in inactive PGs. I've seen this in practice, especially when a cluster contains OSDs of very different weights. In production I personally set this to 1000 to avoid that dynamic, as it can be tricky to troubleshoot if one isn't aware. PG overdose protection is still wise, I raise the value here to avoid people running into the limit. |
|
BZ 2336779 tracks an RFE to be able to disable the autoscaler during upgrades, so that an upgrade that introduces these changes won't be lengthened by having to wait for PG splittings. We have a customer with clusters in excess of 2900 OSDs, so this effect could be significant. |
|
I support this, I personally like to target anywhere between 200 and 250 PGs per OSD. |
Erasure coding doesn't support OMAP yet so must have been xattrs. pglog entries for EC are typically about 700 bytes (encoded) at the moment for a typical write I/O, but will be larger if xattrs are modified because the log entry will need to store the old value of the modified xattrs. The conf setting osd_max_pg_log_entries currently defaults to 10000 so that says the log will be ~7MB per PG. There are extreme cases where EC has to keep a longer pglog. I agree that long term it would make sense to make this a per pool limit because it makes more sense to have a fixed number of log entries per pool than per PG, especially when autoscaler is adjusting the number of PGs. There is also scope to reduce the size of pglog entries for EC - it currently stores an old copy of OI, storing a delta of what has changed between the old OI and new OI would be much more efficient and could save 200+ bytes per entry. |
|
jenkins test api |
|
Hi folks, from the discussion I think there are a few things to confirm before hitting the button:
From our experience, we have seen an incident or two where pglog length has caused OOM conditions for a single OSD on boxes with 512G of RAM. In that kind of extreme, reducing that to log length to 1 (effectively disabled) was our way out (which is fine in our rbd cases anyway, because the pglog rotates so fast that recovery instead of backfill never happens). |
|
I will defer to Mark et all re pg logs. Re disabling the autoscaler, I have not seen any movement on the RFE. I will defer to Mark, Josh, et al whether that is a blocker. If not available RSN, we might consider suggesting disabling manually before performing an upgrade that changes the effective value, then re-enabling when the dust settles. I mainly don't want upgrades to be slowed down by PG splitting. |
|
I've entered https://github.com/ceph/ceph/pull/62367/files which adds advice to disable the autoscaler for the duration of an upgrade. This is not odious or harmful in the general case, and if we can merge this PR so that the target value change goes out in Tentacle, we need not block on my RFE for the upgrade process to automagically suspend PG splitting / merging. |
|
The API failure here I think is a red herring. |
|
Let's retest this. @SrinivasaBharath can you help? |
|
This PR has been added to wip-yuri4-testing-20260603.222947-main. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
I’m about ready to give up. |
|
@anthonyeleven pls rebase |
Signed-off-by: Anthony D'Atri <[email protected]>
|
@anthonyeleven Finished rebasing |
Signed-off-by: Anthony D'Atri <[email protected]>
|
Rebased again |
Thanks! |
|
@yuriw when might this get a qa run so I can merge? |
|
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 |
Signed-off-by: Anthony D'Atri <[email protected]> (cherry picked from commit b54ed6d)
* refs/pull/69452/head: qa/workunits/mon: Update pg_autoscaler.sh in conjunction with #60492 src/common/options: Increase autoscaler PG target and overload values Reviewed-by: Laura Flores <[email protected]>
Signed-off-by: Anthony D'Atri <[email protected]>
src/common/options: Increase autoscaler PG target and overload values
With modern Ceph releases and hardware, the existing values hamper more than they help, especially with the obsolescence of Filestore. This PR increases both the autoscaler's default ratio target and the overload threshold above which an OSD won't activate.
Fixes: https://tracker.ceph.com/issues/68724
Signed-off-by: Anthony D'Atri [email protected]
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