]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: scraper: make fixed history duration
authorAdam Kupczyk <akupczyk@ibm.com>
Thu, 7 Sep 2023 08:25:20 +0000 (08:25 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Thu, 14 Sep 2023 16:11:59 +0000 (16:11 +0000)
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 <akupczyk@ibm.com>
src/test/objectstore/allocsim/ops_scraper.py

index de6c1b3095500ef9a7ec90b8e41d8573c5fcbc04..71f70063ff89b70117d6ccbd3d0a550d066d3a7e 100644 (file)
@@ -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}')