Skip to content

add Elbencho S3 benchmark with async parallel SSH - #359

Open
gitkenan wants to merge 3 commits into
ceph:mainfrom
gitkenan:elbencho-register-bench
Open

gitkenan wants to merge 3 commits into
ceph:mainfrom
gitkenan:elbencho-register-bench

Conversation

@gitkenan

@gitkenan gitkenan commented Aug 7, 2026

Copy link
Copy Markdown

Summary

  • Add a stdlib-only parallel SSH layer to common.py using asyncio + the system ssh binary, so benchmarks can opt out of pdsh with no new dependencies
  • Introduce benchmark/elbencho.py — an S3 benchmark that runs its entire lifecycle (binary check, cleandir, dropcaches, workload fan-out, result pull) through the async SSH path
  • Register Elbencho in benchmarkfactory.py (import + dict entry only — no changes to get_all() or all_configs())
  • 49 unit tests covering construction, validation, factory integration, CLI command building, run-loop fan-out, and pdsh-free lifecycle
  • User-facing docs and a working example YAML config

How Elbencho avoids Cartesian expansion

Elbencho's list-valued parameters (threads, iodepth, blocksize) live inside the workloads: block, not at the top level. all_configs() only sees top-level keys, which are all scalars or dicts, so it naturally yields a single config — no special-case code in the factory needed.

Test plan

  • python -m unittest tests.test_bm_elbencho — 49 tests pass
  • Verify no regressions in existing benchmark tests

798 tests ran, all Elbencho tests (49) pass. The 7 failures are pre-existing post-processing test issues unrelated to our code.

  • End-to-end run against an RGW cluster with the example YAML

@gitkenan

gitkenan commented Aug 7, 2026

Copy link
Copy Markdown
Author
██████╗ ██╗   ██╗██╗     ██╗      ██████╗ ██████╗ ███╗   ██╗ ██████╗ ██╗   ██╗███████╗███████╗████████╗
██╔══██╗██║   ██║██║     ██║     ██╔════╝██╔═══██╗████╗  ██║██╔═══██╗██║   ██║██╔════╝██╔════╝╚══██╔══╝
██████╔╝██║   ██║██║     ██║     ██║     ██║   ██║██╔██╗ ██║██║   ██║██║   ██║█████╗  ███████╗   ██║
██╔═══╝ ██║   ██║██║     ██║     ██║     ██║   ██║██║╚██╗██║██║▄▄ ██║██║   ██║██╔══╝  ╚════██║   ██║
██║     ╚██████╔╝███████╗███████╗╚██████╗╚██████╔╝██║ ╚████║╚██████╔╝╚██████╔╝███████╗███████║   ██║
╚═╝      ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝ ╚══▀▀═╝  ╚═════╝ ╚══════╝╚══════╝   ╚═╝
                                        ── AI REVIEW ──

Scope

The diff matches the Jira ticket and PR description. Story 2 requires registering Elbencho as a benchmark class with factory integration, workload storage, and validation — all present. The _run_workloads() stub is explicitly documented as Story 3 work. No scope creep detected.

Code Review

[P1] benchmark/elbencho.py:71 — The validation loop checks "s3_bucket" is present in the effective merged config, but the error message says "missing required key 's3_bucket'". However, s3_bucket could be defined at the top level (in _global_defaults) and inherited by workloads. The current code does not add s3_bucket to _global_defaults (lines 57-60 only snapshot cmd_path and auth), so a top-level s3_bucket would not be inherited. Either: (1) add s3_bucket to the snapshot if it exists in the top-level config, or (2) document that s3_bucket must be per-workload only. The yaml-config-reference.md shows s3_bucket as a workload-level key (required), so option (2) is correct — but the validation should happen before the merge to give a clearer error.

[P2] benchmarkfactory.py:48 — The comment says "yield a single instance with the raw config dict" but the code does configs = [dict(config)]. This creates a shallow copy, which is fine, but the comment could be clearer: "yield a single instance with a copy of the raw config dict (no Cartesian expansion)".

[P2] benchmark/elbencho.py:64 — The comment "Used to construct the three-tier directory structure (mode/threads/iodepth)" is accurate for Story 3 but misleading in Story 2 where base_run_dir is assigned but never used. Consider adding "(Story 3)" to the comment or deferring the assignment to Story 3.

[P2] tests/test_bm_elbencho.py:44 — The test fixture _FULL_CONFIG includes "secret_key=TEST_SECRET_KEY_DO_NOT_USE" in the auth config string. While this is clearly marked as a test value, it would be safer to use a placeholder like "secret_key=<redacted>" or "secret_key=***" to avoid any possibility of this being copy-pasted into real configs.

[P3] benchmark/elbencho.py:48 — The ValueError message "workloads must be a dict" could be more helpful by showing the actual type received: f"workloads must be a dict, got {type(self.workloads).__name__}".

[P3] benchmarkfactory.py:5-15 — The imports are now alphabetically sorted (good), but the original file had them grouped by benchmark type. The new ordering is fine, but it's a style change unrelated to the core feature. Not blocking, but worth noting for consistency with future PRs.

Security

Credential handling in tests: The test fixture _FULL_CONFIG embeds a fake secret key in plaintext. This is acceptable for unit tests but the comment should explicitly state it's a non-functional test value. The yaml-config-reference.md correctly documents three credential options (inline, env vars, session token) with appropriate warnings about inline credentials appearing in logs. No production credential leakage risk identified.

Summary

The registration is solid and the factory bypass logic is correct. The P1 issue around s3_bucket validation needs clarification — either allow top-level inheritance or validate strictly at the workload level before merging. The P2 items are minor clarity improvements. Tests are comprehensive and the pre-commit scoping is well-designed.

@gitkenan
gitkenan force-pushed the elbencho-register-bench branch 11 times, most recently from 7e64adb to 89776a3 Compare August 10, 2026 08:21
Comment thread benchmark/elbencho.py Outdated
Comment thread benchmarkfactory.py Outdated
@gitkenan
gitkenan force-pushed the elbencho-register-bench branch 3 times, most recently from c6bd7e0 to 550e5d4 Compare August 10, 2026 13:12
@gitkenan

Copy link
Copy Markdown
Author
image

@gitkenan
gitkenan force-pushed the elbencho-register-bench branch 6 times, most recently from 6463326 to f0c2812 Compare August 11, 2026 16:35
@gitkenan
gitkenan requested a review from perezjosibm August 11, 2026 16:44

@perezjosibm perezjosibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few changes needed, eg checking return values from pdsh, documentation. Looking very good, many thanks!

Comment thread benchmark/hsbench.py Outdated
Comment thread docs/workloads/Workloads.md
Comment thread tests/test_bm_elbencho.py
@gitkenan gitkenan changed the title IBMCEPH-17498: register Elbencho as a CBT benchmark register Elbencho as a CBT benchmark Aug 12, 2026
@gitkenan
gitkenan force-pushed the elbencho-register-bench branch 2 times, most recently from 7831e76 to 9a34804 Compare August 13, 2026 08:03
@gitkenan
gitkenan requested a review from perezjosibm August 13, 2026 08:06
@gitkenan

gitkenan commented Aug 19, 2026

Copy link
Copy Markdown
Author

I think we should make any changes in the Main branch (the one under active development) rather than the legacy Master branch which is very out of date and being used to maintain backwards compatibility with older versions of Ceph.

That explains why some of the code does not match the structure I was expecting.

Thanks for this. I've just force-updated and edited the PR to point at main instead. I've then re-done the code changes to align more with the main branch's current state and tried to quickly address your current comments.

I've decided to just lump all of the current changes into this PR, because it's difficult to manage two branches at once as the commits are changing 😄 Apologies that it's become a big PR, but I think for now, hopefully it's good enough that I've split it into different commits.

Since the PR is now larger in scope (effectively covering stories 2 and 3), I've also updated the PR title and description.

@gitkenan gitkenan changed the title register Elbencho as a CBT benchmark add Elbencho S3 benchmark with async parallel SSH Aug 19, 2026
Comment thread common.py Outdated
@gitkenan

gitkenan commented Sep 1, 2026

Copy link
Copy Markdown
Author

This code change has now been verified to be working on a live cluster. Here's the raw log of the run:

14:23:20 - DEBUG    - cbt      - Settings.cluster:
    {'archive_dir': '/tmp/cbt-results',
     'clients': ['cephalasquad6'],
     'clusterid': 'ceph',
     'conf_file': '/etc/ceph/ceph.conf',
     'head': 'cephalasquad6',
     'iterations': 1,
     'osds': ['cephalasquad6'],
     'osds_per_node': 1,
     'rgws': ['cephalasquad6'],
     'tmp_dir': '/tmp/cbt',
     'use_existing': True,
     'user': 'root'}
14:23:20 - INFO     - cbt      - Results dir: /tmp/cbt-results/results/00000000/id-ee0e2095
14:23:20 - INFO     - cbt      - Elbencho workload 'write_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'write', 'mkdirs': True, 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
14:23:20 - INFO     - cbt      - Elbencho workload 'read_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'read', 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
14:23:20 - INFO     - cbt      - Verifying elbencho binary is executable on all client nodes: /usr/local/bin/elbencho
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:21 - INFO     - cbt      - Results dir: /tmp/cbt-results/results/00000000/id-ee0e2095
14:23:21 - INFO     - cbt      - Elbencho workload 'write_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'write', 'mkdirs': True, 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
14:23:21 - INFO     - cbt      - Elbencho workload 'read_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'read', 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
14:23:21 - INFO     - cbt      - Skipping existing Elbencho results in /tmp/cbt-results/results/00000000/id-ee0e2095.
14:23:21 - INFO     - cbt      - Running benchmark {'cmd_path': '/usr/local/bin/elbencho', 'auth': {'config': 'access_key=E51T4YI9Z6Z7AQ4AKAVY;secret_key=M8LCMloHx884hH0tKr15RCKnCF6ypF52ElmbkfC7;url=http://9.71.45.49:8000;retry=9'}, 'workloads': {'write_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'write', 'mkdirs': True, 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}, 'read_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'read', 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}}, 'benchmark': 'elbencho', 'iteration': 0} == iteration 0 ==
14:23:21 - INFO     - cbt      - Setting OSD Read Ahead to: 0
14:23:21 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 find /dev/disk/by-partlabel/osd-device-*data -exec readlink {} \; | cut -d"/" -f 3 | sed "s/[0-9]$//" | xargs -I{} sudo sh -c "echo 0 > /sys/block/'{}'/queue/read_ahead_kb"
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:23 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:23 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: 3
14:23:23 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:24 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:24 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:24 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 sudo /usr/bin/ceph -c /etc/ceph/ceph.conf daemon osd.0 config show > /tmp/cbt/00000000/Elbencho/osd_ra-00000000//ceph_settings.out
14:23:24 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 mkdir -p -m0755 -- /tmp/cbt/00000000/Elbencho/osd_ra-00000000//collectl
14:23:24 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 collectl -s+mYZ -i 1:10 -F0 -f /tmp/cbt/00000000/Elbencho/osd_ra-00000000//collectl --rawdskfilt \"+cciss/c\d+d\d+ |hd[ab] | sd[a-z]+ |dm-\d+ |xvd[a-z] |fio[a-z]+ | vd[a-z]+ |emcpower[a-z]+ |psv\d+ |nvme[0-9]n[0-9]+p[0-9]+ \"
14:23:25 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:25 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:25 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=1 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-001/iodepth-001
14:23:40 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:40 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        42ms        42ms
            Buckets/s        :          23          23
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     15.296s     15.296s
            Objects/s        :           6           6
            Throughput MiB/s :          65          65
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
14:23:40 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:41 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:41 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:41 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=1 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-001/iodepth-004
14:23:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        32ms        32ms
            Buckets/s        :          30          30
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     14.868s     14.868s
            Objects/s        :           6           6
            Throughput MiB/s :          67          67
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
14:23:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:23:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:23:56 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=4 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-004/iodepth-001
14:24:20 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:20 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :       102ms       102ms
            Buckets/s        :           9           9
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     22.373s     23.373s
            Objects/s        :          17          17
            Throughput MiB/s :         173         171
            Total MiB        :        3880        4000
            Objects total    :         388         400
---
14:24:20 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:20 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:20 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:20 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=4 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-004/iodepth-004
14:24:45 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:45 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        44ms        44ms
            Buckets/s        :          22          22
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     23.626s     23.973s
            Objects/s        :          16          16
            Throughput MiB/s :         167         166
            Total MiB        :        3950        4000
            Objects total    :         393         400
---
14:24:45 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:45 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:45 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:45 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=1 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-001/iodepth-001
14:24:47 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:47 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.662s      1.662s
            Objects/s        :          60          60
            Throughput MiB/s :         601         601
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
14:24:47 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:47 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:47 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:47 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=1 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-001/iodepth-004
14:24:49 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:49 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.068s      1.068s
            Objects/s        :          93          93
            Throughput MiB/s :         935         935
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
14:24:49 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:49 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:49 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:49 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=4 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-004/iodepth-001
14:24:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.531s      2.397s
            Objects/s        :         185         166
            Throughput MiB/s :        1857        1668
            Total MiB        :        2844        4000
            Objects total    :         284         400
---
14:24:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:52 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=4 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-004/iodepth-004
14:24:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.548s      1.628s
            Objects/s        :         249         245
            Throughput MiB/s :        2504        2455
            Total MiB        :        3879        4000
            Objects total    :         387         400
---
14:24:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
14:24:54 - INFO     - cbt      - Elbencho: all workloads complete.
14:24:54 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 pkill -SIGINT -f collectl
14:24:55 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
14:24:55 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.```

@perezjosibm perezjosibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, many thanks!

Comment thread benchmark/elbencho.py Outdated
Comment thread docs/ReplacingPdsh.md Outdated
Comment thread example/wip-elbencho/elbencho_ex.yaml
@gitkenan
gitkenan force-pushed the elbencho-register-bench branch from ca6b119 to 31a9e54 Compare September 2, 2026 11:10
Comment thread benchmark/elbencho.py Outdated
Comment thread common.py Outdated
Comment thread common.py Outdated
pdsh is being dropped from Rocky Linux 10, so the command fan-out mechanism is
being moved behind an interface it can be swapped out from incrementally rather
than replaced in place. The new remote/ package holds a RemoteExecutor abstract
base class (run_command / run_command_with_error_checking) and a stdlib-only
AsyncSSHExecutor implementation (asyncio + the system ssh binary, no third-party
packages), plus the pdsh-free cluster helpers make_remote_dir/clean_remote_dir/
sync_files. common.py's pdsh code is left untouched so every existing benchmark
keeps working unchanged; docs/ReplacingPdsh.md tracks the remaining migration
(ceph tracker #80193).

Signed-off-by: Kenan Al-Shamie <kenan.al-shamie@ibm.com>
Assisted-by: Claude-v2.1.212:claude-opus-4-8
@gitkenan
gitkenan force-pushed the elbencho-register-bench branch 7 times, most recently from ca7c886 to c2acff8 Compare September 8, 2026 09:07
Comment thread remote/remote_executor.py
@@ -0,0 +1,41 @@
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to type all the function variables as well e.g.

def make_remote_dir(self, remote_dir) -> None:

becomes (assuming remote_dir is a string):

def make_remote_dir(self, remote_dir: str) -> None:

Comment thread remote/remote_executor.py Outdated
Comment thread remote/async_ssh.py

@harriscr harriscr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I like the fact we have a good set of unit tests for the new code. The structure for the remote_executor works nicely and should be easy to fit pdsh into.

Just some minor things to look at and it will be good to go

Comment thread remote/async_ssh.py Outdated
Comment thread remote/async_ssh.py
if isinstance(item, BaseException):
errors.append(str(item))
logger.warning("scp: failed to launch process: %s", item)
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is duplicated in 2 places. It could be an opportunity to streamline the code in the future. I wouldn't necessarily worry about it for this PR though

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :) I'll put in a TODO

Comment thread remote/async_ssh.py Outdated
Comment thread tests/test_async_ssh.py
Comment thread benchmark/elbencho.py
Comment thread benchmark/elbencho.py
Comment thread benchmark/elbencho.py Outdated
@gitkenan
gitkenan force-pushed the elbencho-register-bench branch from c2acff8 to a093d6f Compare September 11, 2026 14:24
Introduce the Elbencho benchmark for S3 object workloads. It builds commands
through the shared Workloads pipeline the same way librbdfio does — an
ElbenchoCommand (command/elbencho_command.py) created via
Workload._create_command_class, with list-valued params expanded by
all_configs() — and fans the generated command strings out through a
RemoteExecutor, so its whole lifecycle (binary check, dropcaches, directory
setup, workload runs, result sync) is pdsh-free.

The one non-obvious piece is auth threading: S3 credentials arrive as a nested
dict, which the Workloads global-option collection would stringify, so they are
flattened into flat string options before the base class builds the pipeline. A
new execution-agnostic Workloads.command_groups() generator exposes the per-cell
commands so Elbencho can drive them without the still-pdsh-based Workloads.run().
Includes the unit test suite.

Signed-off-by: Kenan Al-Shamie <kenan.al-shamie@ibm.com>
Assisted-by: Claude-v2.1.212:claude-opus-4-8
User-facing guide for running the Elbencho S3 benchmark via CBT: the test-plan
YAML structure, the blocksize/size interaction (single-PUT vs multipart upload
and the 5 MB minimum part size), running instructions, and expected result
output. Links Elbencho from docs/Workloads.md.

Signed-off-by: Kenan Al-Shamie <kenan.al-shamie@ibm.com>
Assisted-by: Claude-v2.1.212:claude-opus-4-8
@gitkenan
gitkenan force-pushed the elbencho-register-bench branch from a093d6f to 3ecc16d Compare September 11, 2026 14:42
@gitkenan

Copy link
Copy Markdown
Author

All of the above should be acknowledged now, or documented for soon-to-comes. The latest force-push has been tested with the following success log for running Elbencho:

09:30:52 - DEBUG    - cbt      - Settings.cluster:
    {'archive_dir': '/tmp/cbt-results',
     'clients': ['cephalasquad6'],
     'clusterid': 'ceph',
     'conf_file': '/etc/ceph/ceph.conf',
     'head': 'cephalasquad6',
     'iterations': 1,
     'osds': ['cephalasquad6'],
     'osds_per_node': 1,
     'rgws': ['cephalasquad6'],
     'tmp_dir': '/tmp/cbt',
     'use_existing': True,
     'user': 'root'}
09:30:52 - INFO     - cbt      - Results dir: /tmp/cbt-results/results/00000000/id-ee0e2095
09:30:52 - INFO     - cbt      - Elbencho workload 'write_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'write', 'mkdirs': True, 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
09:30:52 - INFO     - cbt      - Elbencho workload 'read_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'read', 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
09:30:52 - INFO     - cbt      - Verifying elbencho binary is executable on all client nodes: /usr/local/bin/elbencho
09:30:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:53 - INFO     - cbt      - Results dir: /tmp/cbt-results/results/00000000/id-ee0e2095
09:30:53 - INFO     - cbt      - Elbencho workload 'write_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'write', 'mkdirs': True, 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
09:30:53 - INFO     - cbt      - Elbencho workload 'read_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'read', 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}
09:30:53 - INFO     - cbt      - Skipping existing Elbencho results in /tmp/cbt-results/results/00000000/id-ee0e2095.
09:30:53 - INFO     - cbt      - Running benchmark {'cmd_path': '/usr/local/bin/elbencho', 'auth': {'config': 'access_key=E51T4YI9Z6Z7AQ4AKAVY;secret_key=M8LCMloHx884hH0tKr15RCKnCF6ypF52ElmbkfC7;url=http://9.71.45.49:8000;retry=9'}, 'workloads': {'write_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'write', 'mkdirs': True, 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}, 'read_small': {'s3_bucket': 'cbt-benchmark', 'mode': 'read', 'threads': [1, 4], 'iodepth': [1, 4], 'blocksize': ['5g'], 'size': '10m', 'num_objects': 100, 'duration': 30}}, 'benchmark': 'elbencho', 'iteration': 0} == iteration 0 ==
09:30:53 - INFO     - cbt      - Setting OSD Read Ahead to: 0
09:30:53 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 find /dev/disk/by-partlabel/osd-device-*data -exec readlink {} \; | cut -d"/" -f 3 | sed "s/[0-9]$//" | xargs -I{} sudo sh -c "echo 0 > /sys/block/'{}'/queue/read_ahead_kb"
09:30:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: 3
09:30:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:54 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:54 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 sudo /usr/bin/ceph -c /etc/ceph/ceph.conf daemon osd.0 config show > /tmp/cbt/00000000/Elbencho/osd_ra-00000000//ceph_settings.out
09:30:55 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 mkdir -p -m0755 -- /tmp/cbt/00000000/Elbencho/osd_ra-00000000//collectl
09:30:55 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 collectl -s+mYZ -i 1:10 -F0 -f /tmp/cbt/00000000/Elbencho/osd_ra-00000000//collectl --rawdskfilt \"+cciss/c\d+d\d+ |hd[ab] | sd[a-z]+ |dm-\d+ |xvd[a-z] |fio[a-z]+ | vd[a-z]+ |emcpower[a-z]+ |psv\d+ |nvme[0-9]n[0-9]+p[0-9]+ \"
09:30:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:30:56 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:30:56 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=1 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-001/iodepth-001
09:31:11 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:31:11 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        38ms        38ms
            Buckets/s        :          26          26
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     15.333s     15.333s
            Objects/s        :           6           6
            Throughput MiB/s :          65          65
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
09:31:11 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:31:12 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:31:12 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:31:12 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=1 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-001/iodepth-004
09:31:27 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:31:27 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        37ms        37ms
            Buckets/s        :          26          26
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     15.342s     15.342s
            Objects/s        :           6           6
            Throughput MiB/s :          65          65
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
09:31:27 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:31:28 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:31:28 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:31:28 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=4 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-004/iodepth-001
09:31:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:31:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        97ms        97ms
            Buckets/s        :          10          10
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     23.811s     24.215s
            Objects/s        :          16          16
            Throughput MiB/s :         165         165
            Total MiB        :        3950        4000
            Objects total    :         394         400
---
09:31:52 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:31:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:31:53 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:31:53 - INFO     - cbt      - Elbencho [write_small] bs=5g threads=4 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//write_5368709120/threads-004/iodepth-004
09:32:18 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:18 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
MKBUCKETS   Elapsed time     :        32ms        32ms
            Buckets/s        :          31          31
            Buckets total    :           1           1
---
WRITE       Elapsed time     :     24.649s     25.074s
            Objects/s        :          16          15
            Throughput MiB/s :         160         159
            Total MiB        :        3950        4000
            Objects total    :         395         400
---
09:32:18 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:19 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:19 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:19 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=1 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-001/iodepth-001
09:32:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.684s      1.684s
            Objects/s        :          59          59
            Throughput MiB/s :         593         593
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
09:32:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:21 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:21 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=1 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-001/iodepth-004
09:32:22 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:22 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.067s      1.067s
            Objects/s        :          93          93
            Throughput MiB/s :         937         937
            Total MiB        :        1000        1000
            Objects total    :         100         100
---
09:32:22 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:23 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:23 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:23 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=4 iodepth=1 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-004/iodepth-001
09:32:25 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:25 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.536s      2.374s
            Objects/s        :         187         168
            Throughput MiB/s :        1880        1684
            Total MiB        :        2889        4000
            Objects total    :         288         400
---
09:32:25 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:26 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:26 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:26 - INFO     - cbt      - Elbencho [read_small] bs=5g threads=4 iodepth=4 → /tmp/cbt/00000000/Elbencho/osd_ra-00000000//read_5368709120/threads-004/iodepth-004
09:32:28 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:28 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.538s      1.714s
            Objects/s        :         244         233
            Throughput MiB/s :        2456        2333
            Total MiB        :        3780        4000
            Objects total    :         377         400
---
09:32:28 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
09:32:28 - INFO     - cbt      - Elbencho: all workloads complete.
09:32:28 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 pkill -SIGINT -f collectl
09:32:29 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
09:32:29 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
[root@cephalasquad6 cbt]# vi example/wip-elbencho/elbencho_ex.yaml

15:42:57 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
15:42:57 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 pkill -SIGINT -f collectl
15:42:58 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
15:42:58 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
15:42:58 - INFO     - cbt      - Elbencho: running 1 command(s) → /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-001
15:42:58 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 mkdir -p -m0755 -- /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-001/collectl
15:42:58 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 collectl -s+mYZ -i 1:10 -F0 -f /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-001/collectl --rawdskfilt \"+cciss/c\d+d\d+ |hd[ab] | sd[a-z]+ |dm-\d+ |xvd[a-z] |fio[a-z]+ | vd[a-z]+ |emcpower[a-z]+ |psv\d+ |nvme[0-9]n[0-9]+p[0-9]+ \"
15:42:58 - DEBUG    - cbt      - Elbencho cmd: /usr/local/bin/elbencho --read --threads 4 --block 5g --iodepth 1 --size 10m --files 100 --timelimit 30 --s3endpoints http://9.71.45.49:8000 --s3key E51T4YI9Z6Z7AQ4AKAVY --s3secret M8LCMloHx884hH0tKr15RCKnCF6ypF52ElmbkfC7 --s3region default --resfile /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-001/result.csv s3://cbt-benchmark
15:43:01 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
15:43:01 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.501s      2.407s
            Objects/s        :         189         166
            Throughput MiB/s :        1896        1661
            Total MiB        :        2846        4000
            Objects total    :         284         400
---
15:43:01 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
15:43:01 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 pkill -SIGINT -f collectl
15:43:02 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
15:43:02 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
15:43:02 - INFO     - cbt      - Elbencho: running 1 command(s) → /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-004
15:43:02 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 mkdir -p -m0755 -- /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-004/collectl
15:43:02 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 collectl -s+mYZ -i 1:10 -F0 -f /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-004/collectl --rawdskfilt \"+cciss/c\d+d\d+ |hd[ab] | sd[a-z]+ |dm-\d+ |xvd[a-z] |fio[a-z]+ | vd[a-z]+ |emcpower[a-z]+ |psv\d+ |nvme[0-9]n[0-9]+p[0-9]+ \"
15:43:02 - DEBUG    - cbt      - Elbencho cmd: /usr/local/bin/elbencho --read --threads 4 --block 5g --iodepth 4 --size 10m --files 100 --timelimit 30 --s3endpoints http://9.71.45.49:8000 --s3key E51T4YI9Z6Z7AQ4AKAVY --s3secret M8LCMloHx884hH0tKr15RCKnCF6ypF52ElmbkfC7 --s3region default --resfile /tmp/cbt/00000000/Elbencho/osd_ra-00000000/elbencho/read_5368709120/threads-004/iodepth-004/result.csv s3://cbt-benchmark
15:43:04 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
15:43:04 - DEBUG    - cbt      - ssh [root@cephalasquad6] stdout: OPERATION   RESULT TYPE         FIRST DONE   LAST DONE
=========== ================    ==========   =========
READ        Elapsed time     :      1.613s      1.658s
            Objects/s        :         244         241
            Throughput MiB/s :        2442        2412
            Total MiB        :        3941        4000
            Objects total    :         394         400
---
15:43:04 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.
15:43:04 - DEBUG    - cbt      - CheckedPopen continue_if_error=True, shell=False args=pdsh -f 1 -R ssh -w root@cephalasquad6 pkill -SIGINT -f collectl
15:43:04 - INFO     - cbt      - Elbencho: all workloads complete.
15:43:05 - DEBUG    - cbt      - ssh [root@cephalasquad6] exit=0
15:43:05 - DEBUG    - cbt      - ssh [root@cephalasquad6] stderr: Authorized users only. All activity may be monitored and reported.```


_MODES_NO_BLOCKSIZE = {"stat", "list"}

def __init__(self, options: dict, workload_output_directory: str) -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're still not sub-typing the dictionary here. and at line 53, 81, 106

Comment thread command/command.py
# ``options`` is the raw config from the YAML/test plan: heterogeneous
# values (ints, bools, strings). _parse_options() is the boundary that
# normalizes it into the str|None CliOptions store.
def __init__(self, options: Mapping[str, Any]) -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the fact we have loosened the typing here and in the signatures of the rest of the methods. Mypy will ignore checking any Any typed things, so we lose strictness inherent here.
I'm fairly sure that on the rbdfio path options are always a dict[str,str]. It's definitely processed from the raw yaml before it arrives here

Bob suggests:
"By the time options reaches RbdFioCommand.init or ElbenchoCommand.init, the type is provably dict[str, str]:"
but take that with the correct level of scepticism

Comment thread command/fio_command.py
_DIRECT_TRANSLATIONS: list[str] = ["numjobs", "iodepth"]

def __init__(self, options: dict[str, str], workload_output_directory: str) -> None:
def __init__(self, options: Mapping[str, Any], workload_output_directory: str) -> None:

@harriscr harriscr Sep 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as with the comment in command.py, I don't like the loosening of the type checking here. Especially as it's been changed for the existing classes, but not for the elbencho command class which is being added

Same for lines 40, 46 and 51

_RBD_DEFAULT_OPTIONS: dict[str, str] = {"ioengine": "rbd", "clientname": "admin"}

def __init__(self, options: dict[str, str], workload_output_directory: str) -> None:
def __init__(self, options: Mapping[str, Any], workload_output_directory: str) -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as with the comment in command.py, I don't like the loosening of the type checking here. Especially as it's been changed for the existing classes, but not for the elbencho command class which is being added

and line 39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants