Project

General

Profile

Actions

Enhancement #73892

closed
PA EZ

Pg AutoScaler should not consider pools with `pg autoscaler: off` in overlapping roots calculation

Enhancement #73892: Pg AutoScaler should not consider pools with `pg autoscaler: off` in overlapping roots calculation

Added by Parth Arora about 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella, tentacle
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-130-g69c30a7d54
Released In:
Upkeep Timestamp:
2026-10-29T01:03:46+00:00

Description

ODF use case:

Need to deploy ODF with:

1) Default pools with default crush root

2) 3 replica-1 balanced pools in specific Zones(us-east-1 , us-east-2, us-east-3), so the crush root would be specific to zones(pg autoscaler should be turned off).

Currently, pg autoscaler gets stopped as it sees a different crush root is being used,
If we could have an option to exclude these three balanced pools (with PG autoscaler turned off), it would help with this configuration.

However, a more general solution to exclude all pools with the PG autoscaler disabled would be ideal.


Related issues 2 (0 open — 2 closed)

Copied to RADOS - Backport #78885: tentacle: Pg AutoScaler should not consider pools with `pg autoscaler: off` in overlapping roots calculationResolvedEric Zhang

Actions
Copied to RADOS - Backport #78886: umbrella: Pg AutoScaler should not consider pools with `pg autoscaler: off` in overlapping roots calculationResolvedEric Zhang

Actions

KS Updated by Kamoltat (Junior) Sirivadhna about 1 year ago · Edited Actions #1

  • Assignee set to Kamoltat (Junior) Sirivadhna

Scenario where the autoscaler will fail to scale a pool, when it the pool is using a different crush rule that starts
with a subtree of root default.

sh-5.1$ ceph osd df tree
ID   CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP    META     AVAIL    %USE   VAR   PGS  STATUS  TYPE NAME                                   
 -1         0.58612         -  600 GiB   67 GiB   66 GiB  62 KiB  867 MiB  533 GiB  11.10  1.00    -          root default                                
 -5         0.58612         -  600 GiB   67 GiB   66 GiB  62 KiB  867 MiB  533 GiB  11.10  1.00    -              region us-east                          
-14         0.19537         -  200 GiB   30 GiB   29 GiB  21 KiB  313 MiB  170 GiB  14.88  1.34    -                  zone us-east-1                      
-17         0.09769         -  100 GiB  3.1 GiB  3.1 GiB   9 KiB   62 MiB   97 GiB   3.13  0.28    -                      host ocs-deviceset-1-data-1l7gfj
  3    ssd  0.09769   1.00000  100 GiB  3.1 GiB  3.1 GiB   9 KiB   62 MiB   97 GiB   3.13  0.28  130      up                  osd.3                       
-13         0.09769         -  100 GiB   27 GiB   26 GiB  12 KiB  251 MiB   73 GiB  26.62  2.40    -                      host ocs-deviceset-2-data-0dm4rv
  2    ssd  0.09769   1.00000  100 GiB   27 GiB   26 GiB  12 KiB  251 MiB   73 GiB  26.62  2.40  137      up                  osd.2                       
-10         0.19537         -  200 GiB   30 GiB   30 GiB  21 KiB  262 MiB  170 GiB  15.14  1.36    -                  zone us-east-2                      
 -9         0.09769         -  100 GiB   27 GiB   27 GiB  12 KiB  203 MiB   73 GiB  26.96  2.43    -                      host ocs-deviceset-0-data-0hf7fq
  1    ssd  0.09769   1.00000  100 GiB   27 GiB   27 GiB  12 KiB  203 MiB   73 GiB  26.96  2.43  122      up                  osd.1                       
-21         0.09769         -  100 GiB  3.3 GiB  3.3 GiB   9 KiB   58 MiB   97 GiB   3.32  0.30    -                      host ocs-deviceset-2-data-1cdt8z
  5    ssd  0.09769   1.00000  100 GiB  3.3 GiB  3.3 GiB   9 KiB   58 MiB   97 GiB   3.32  0.30  139      up                  osd.5                       
 -4         0.19537         -  200 GiB  6.6 GiB  6.3 GiB  20 KiB  292 MiB  193 GiB   3.29  0.30    -                  zone us-east-3                      
-19         0.09769         -  100 GiB  3.5 GiB  3.4 GiB   9 KiB   59 MiB   97 GiB   3.46  0.31    -                      host ocs-deviceset-0-data-1n4djd
  4    ssd  0.09769   1.00000  100 GiB  3.5 GiB  3.4 GiB   9 KiB   59 MiB   97 GiB   3.46  0.31  139      up                  osd.4                       
 -3         0.09769         -  100 GiB  3.1 GiB  2.9 GiB  11 KiB  233 MiB   97 GiB   3.12  0.28    -                      host ocs-deviceset-1-data-0mjzsp
  0    ssd  0.09769   1.00000  100 GiB  3.1 GiB  2.9 GiB  11 KiB  233 MiB   97 GiB   3.12  0.28  121      up                  osd.0                       
                        TOTAL  600 GiB   67 GiB   66 GiB  65 KiB  867 MiB  533 GiB  11.10                                                                 
MIN/MAX VAR: 0.28/2.43  STDDEV: 11.09

User:
I want 3 replica one pools in specific Zones(us-east-1 , us-east-2, us-east-3), so there crush root would be specific to zones,
And I want other replica 3 pools to have default crush root.
Any way do you think we can have this configuration, and not disturbing the pg autoscaler.

Me:

Okay so from my understanding, you will have 4 total different crush rules, 1 of them will be a take default which basically chooseleaf firstn 3 type host The other 3 will look like this:

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

This will unfortunately make the autoscaler detect overlapping roots. since the take default rule will share OSDs amongst zone-1, zone-2 and zone-3 rules. I see your pain point. I’m trying to think if I were to make the autoscaler work well with this, I might have to change the core logic of the autoscaler. Maybe combining your initial idea of not accounting the pools that have autoscale off in the calculation phase of final_pg_num_target ,

KS Updated by Kamoltat (Junior) Sirivadhna about 1 year ago Actions #2

  • Category deleted (Correctness/Safety)

KS Updated by Kamoltat (Junior) Sirivadhna 8 months ago Actions #3

  • Assignee changed from Kamoltat (Junior) Sirivadhna to Eric Zhang

RZ Updated by Radoslaw Zarzynski 8 months ago Actions #4

  • Status changed from New to In Progress

KS Updated by Kamoltat (Junior) Sirivadhna 7 months ago Actions #5

  • Pull request ID set to 68532

EZ Updated by Eric Zhang 6 months ago Actions #6

  • Status changed from In Progress to Fix Under Review

RZ Updated by Radoslaw Zarzynski 6 months ago Actions #7

Actively reviewed.

UB Updated by Upkeep Bot 6 months ago Actions #8

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to 69c30a7d54165e5e88047394b9bdb9b0c86e0dc1
  • Fixed In set to v21.3.0-130-g69c30a7d54
  • Upkeep Timestamp set to 2026-06-15T17:30:50+00:00

KS Updated by Kamoltat (Junior) Sirivadhna 4 months ago Actions #9

  • Backport set to tentacle, squid

KS Updated by Kamoltat (Junior) Sirivadhna 4 months ago Actions #10

  • Status changed from Resolved to Pending Backport
  • Backport changed from tentacle, squid to umbrella, tentacle, squid

KS Updated by Kamoltat (Junior) Sirivadhna 4 months ago Actions #11

  • Backport changed from umbrella, tentacle, squid to umbrella, tentacle

UB Updated by Upkeep Bot 4 months ago Actions #12

  • Copied to Backport #78885: tentacle: Pg AutoScaler should not consider pools with `pg autoscaler: off` in overlapping roots calculation added

UB Updated by Upkeep Bot 4 months ago Actions #13

  • Copied to Backport #78886: umbrella: Pg AutoScaler should not consider pools with `pg autoscaler: off` in overlapping roots calculation added

UB Updated by Upkeep Bot 4 months ago Actions #14

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #15

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-06-15T17:30:50+00:00 to 2026-08-27T18:34:48+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #16

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-08-27T18:34:48+00:00 to 2026-10-29T01:03:46+00:00
Actions

Also available in: PDF Atom