From: Adam Kupczyk Date: Thu, 7 Sep 2023 08:25:20 +0000 (+0000) Subject: os/bluestore: scraper: make fixed history duration X-Git-Tag: v19.0.0~409^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8d34ada008bedc071c7414adf6fba9acf9ab6d09;p=ceph.git os/bluestore: scraper: make fixed history duration Set fixes 2s of OSD history ops duration. OSD behaves wierd if there is full ops size. Make duration small to lets ops leave capture window quickly. Signed-off-by: Adam Kupczyk --- diff --git a/src/test/objectstore/allocsim/ops_scraper.py b/src/test/objectstore/allocsim/ops_scraper.py index de6c1b309550..71f70063ff89 100644 --- a/src/test/objectstore/allocsim/ops_scraper.py +++ b/src/test/objectstore/allocsim/ops_scraper.py @@ -10,6 +10,7 @@ import time import logging FORMAT = '%(name)8s::%(levelname)8s:: %(message)s' +HISTORY_HOLD = 2 logging.basicConfig(format=FORMAT) logger = logging.getLogger('osd-op-scrapper') @@ -180,6 +181,10 @@ def _set_osd_history_size(name: str, history_size: int): run_ceph_command(['tell', f'osd.{name}', 'config', 'set', 'osd_op_history_size', str(int(history_size))], no_out=True) +def _set_osd_history_duration(name: str, duration: int): + run_ceph_command(['tell', f'osd.{name}', 'config', 'set', 'osd_op_history_duration', + str(duration)], no_out=True) + class OsdParameters: def __init__(self, name: str, ready_time: int, freq: int, history_size: int) -> None: self.name = name @@ -239,6 +244,7 @@ def main(): osds_info = [] for osd in osds: _set_osd_history_size(osd, max_history_size) + _set_osd_history_duration(osd, HISTORY_HOLD) #fixed 2s duration to hold ops osds_info.append(OsdParameters(osd, 0, freq, history_size)) logger.debug(f'start freq {freq}')