change is in progress). **NEW PG_NUM**, if present, is what the
system believes the pool's ``pg_num`` should be changed to. It is
always a power of 2, and will only be present if the "ideal" value
-varies from the current value by more than a factor of 3.
+varies from the current value by more than a factor of 3 by default.
+This factor can be be adjusted with::
+
+ ceph config set mgr mgr/pg_autoscaler/threshold 2.0
**AUTOSCALE**, is the pool ``pg_autoscale_mode``
and will be either ``on``, ``off``, or ``warn``.
'means starts out with full pgs and scales down when '
'there is pressure '),
runtime=True),
+ Option(
+ name='threshold',
+ type='float',
+ desc='scaling threshold',
+ long_desc=('The factor by which the `NEW PG_NUM` must vary from the current'
+ '`PG_NUM` before being accepted. Should not be less than 2.0'),
+ default=3.0,
+ min=2.0),
]
def __init__(self, *args: Any, **kwargs: Any) -> None:
self.autoscale_profile: 'ScaleModeT' = 'scale-up'
self.sleep_interval = 60
self.mon_target_pg_per_osd = 0
+ self.threshold = 3.0
def config_notify(self) -> None:
for opt in self.NATIVE_OPTIONS:
osdmap: OSDMap,
pools: Dict[str, Dict[str, Any]],
profile: 'ScaleModeT',
- threshold: float = 3.0,
) -> Tuple[List[Dict[str, Any]],
Dict[int, CrushSubtreeResourceStatus]]:
+ threshold = self.threshold
assert threshold >= 2.0
crush_map = osdmap.get_crush()