Repository navigation
cephfs-tool: Improve reporting and config options - #68519
Conversation
vshankar
left a comment
There was a problem hiding this comment.
Minor nit. Good work @edwinzrodriguez
d0b546f to
1cc5169
Compare
|
jenkins test windows |
vshankar
left a comment
There was a problem hiding this comment.
LGTM. Nice work.
I believe we have documentation for cephfs-tool and we should add to that for these new improvements (use LLM to write that out required :)
I updated docs for cephfs-tool |
| @@ -60,7 +64,7 @@ General Options | |||
|
|
|||
| Path to keyring file | |||
|
|
|||
| .. option:: --filesystem <name> | |||
| .. option:: --filesystem, --fs <name> | |||
There was a problem hiding this comment.
--fs is an option to the tool. for some reason wasn't documented that way originally. This fixes that oversite.
There was a problem hiding this comment.
Fair enough. Without the context it seemed like adding an alias.
e6c42c5 to
1a4e3d7
Compare
|
jenkins retest this please |
1 similar comment
|
jenkins retest this please |
|
jenkins test api |
|
jenkins test make check |
|
jenkins test make check arm64 |
3e84a75 to
069800a
Compare
|
@edwinzrodriguez - last commit does not have Signed-off-by tag. |
069800a to
fe80c42
Compare
|
jenkins test make check arm64 |
|
jenkins test api |
1 similar comment
|
jenkins test api |
|
jenkins test windows |
Add --json to write structured benchmark results (configuration, per-iteration read/write metrics, and cross-iteration summary statistics) to a file using JSONFormatter. Extend print_statistics() to optionally mirror mean, stddev, min, and max into the JSON document. Improve parse_size() to accept both SI (1000-based, e.g. "4MB") and binary (1024-based, e.g. "4MiB") size suffixes. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Add --duration to cap each read and write phase at N seconds instead of running until all files are processed. Workers loop until the time limit expires, cycling through their per-thread file set in duration mode. Pass phase start time into worker threads for consistent cross-thread duration checks. Only count each unique file once in stats even when filenames are reused across cycles. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Add --perf-dump to write libcephfs client performance counters to a file at the end of the benchmark. Uses ceph_get_perf_counters() while the mount is still active so counters reflect the full benchmark run. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Add --client-oc and --client-oc-size to override libcephfs object cacher settings before ceph_init. Enables benchmarking with the object cacher enabled or disabled and with a configurable cache size. Resolved values are shown in console and JSON output. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Add --progress and --progress-interval to display live bandwidth, IOPS, and ETA during read/write phases. A background progress_reporter thread aggregates per-thread stats every 100ms and prints a single updating status line. Progress percentage is based on elapsed time when --duration is set, otherwise on files completed. Make ThreadStats fields atomic so workers and the reporter can access them concurrently. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
…ration Add --msgr-workers to override ms_async_op_threads before mount (1-24; 0 keeps the ceph.conf default). Controls async messenger I/O threads independently of benchmark worker thread count. Validate the range at startup and include the resolved value in console and JSON output. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
When built with CEPH_LOCKSTAT, add --lockstat-dump and --lockstat-threshold to collect lock contention data during benchmark phases. Start collection at benchmark begin, reset counters before each read/write phase, and dump per-iteration/per-phase JSON files (e.g. base_iter1_write.json). Requires a lockstat-instrumented libcephfs build. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Add --async-io to use ceph_ll_nonblocking_readv_writev for read and write workers instead of synchronous ceph_read/ceph_write. Add --queue-depth to limit outstanding async I/Os per thread via a counting semaphore and pre-allocated AsyncIOContext pool. Async write uses ceph_ll_create; async read uses ceph_ll_walk + ceph_ll_open and defers inode release until all async ops including readahead complete. Reject --async-io with --per-thread-mount since async workers require a shared mount. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Set pthread names on all benchmark worker threads (wr-worker-N, rd-worker-N) via ceph_pthread_setname so they are visible in top, perf, and lockstat output during profiling. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Add inline comments documenting each benchmark enhancement and its CLI flag. Remove duplicate ceph_pthread_setname calls accidentally introduced in sync read/write workers. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
…chmark runs Added filesystem stats reporting to cephfs-tool.cc. Helper functions • fetch_statvfs() — uses ceph_ll_statfs on the root inode when --async-io is set, otherwise ceph_statfs on mount_root • report_fs_stats() — prints and optionally JSON-encodes: • Total / free blocks • File count When it runs • Before the iteration loop (after the bench directory is created) • After all iterations finish (before the final report and optional cleanup) Console output example Filesystem statistics (before iterations): Total blocks: ... Free blocks: ... Files: ... JSON output (when --json is used) adds a filesystem_stats section with before and after objects containing the same fields. Fixes: https://tracker.ceph.com/issues/76183 Signed-off-by: Edwin Rodriguez <[email protected]>
Signed-off-by: Edwin Rodriguez <[email protected]>
…` options Add --async-write-fsync and --shared-file benchmark options. --async-write-fsync sets ceph_ll_io_info.fsync on each async write to model Ganesha-style write+commit and skips the post-phase ceph_ll_fsync when enabled. --shared-file directs all worker threads at one file to stress client_lock contention on a single inode. Both options are recorded in JSON/text output. Signed-off-by: Edwin Rodriguez <[email protected]>
fe80c42 to
1817911
Compare
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
bench_async_write_worker destroyed AsyncIOContext while the finisher still ran async_io_callback after setting completed. Track in-flight callbacks per worker and drain before tearing down the io_queue. Signed-off-by: Edwin Rodriguez <[email protected]>
|
This PR has been added to main integration testing by vshankar started 2026-07-08-09:12. |
|
jenkins retest this please |
| .. option:: --client-oc <0|1> | ||
|
|
||
| Override the ``client_oc`` setting for the benchmark mount | ||
|
|
||
| .. option:: --client-oc-size <value> | ||
|
|
||
| Override the ``client_oc_size`` setting for the benchmark mount | ||
|
|
||
| .. option:: --msgr-workers <n> | ||
|
|
||
| Override ``ms_async_op_threads`` for the benchmark mount. Valid values are | ||
| ``1`` to ``24``; ``0`` keeps the configured default. | ||
|
|
There was a problem hiding this comment.
This should already be possible with:
env CEPH_ARGS='--client-oc=X' cephfs-tool ...
Are you sure you want to wire these up?
There was a problem hiding this comment.
That was my first approach but couldn't get it working, so it seemed more consistent to add the cli option
There was a problem hiding this comment.
@batrick - would it be fine to take care of this later so that this change can be merged?
There was a problem hiding this comment.
Let's take care of this in a future change.
|
@edwinzrodriguez - I am fine with merging this if #68519 (comment) can be addressed (or we merge this and follow it up with that change)? WDYT? |
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. |
Add an option to output results in json format for better machine interpretation.
Add an option to specify a max duration for tests
Add an option to dump client perf counters
Add an option to set client cache parameters
Add an option to display progress during benchmark execution.
Add async I/O option
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.