]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson: Add support for bench osd command 57952/head
authorNitzan Mordechai <nmordech@redhat.com>
Mon, 10 Jun 2024 10:51:03 +0000 (10:51 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Mon, 26 Aug 2024 05:43:17 +0000 (05:43 +0000)
commitee84f8970ab5f5bc7995a2bf40e46f5f2ddd67d8
treed3debda2ce3404e49f7c9ebd490e136e2a25b201
parentdb4959e44f0252a53b4d8688fbf88b3dda70ea12
crimson: Add support for bench osd command

this commit adds support for the 'bench' admin command in the OSD,
allowing administrators to perform benchmark tests on the OSD. The
'bench' command accepts 4 optional parameters with the following
default values:

1. count - Total number of bytes to write (default: 1GB).
2. size - Block size for each write operation (default: 4MB).
3. object_size - Size of each object to write (default: 0).
4. object_num - Number of objects to write (default: 0).

The results of the benchmark are returned in a JSON formatted output,
which includes the following fields:

1. bytes_written - Total number of bytes written during the benchmark.
2. blocksize - Block size used for each write operation.
3. elapsed_sec - Total time taken to complete the benchmark in seconds.
4. bytes_per_sec - Write throughput in bytes per second.
5. iops - Number of input/output operations per second.

Example JSON output:

```json
{
  "osd_bench_results": {
    "bytes_written": 1073741824,
    "blocksize": 4194304,
    "elapsed_sec": 0.5,
    "bytes_per_sec": 2147483648,
    "iops": 512
  }
}

Fixes: https://tracker.ceph.com/issues/66380
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
qa/suites/crimson-rados/basic/tasks/rados_python.yaml
src/crimson/admin/osd_admin.cc
src/crimson/admin/osd_admin.h
src/crimson/osd/osd.cc
src/crimson/osd/osd.h
src/include/types.h