Create a Ceph performance test request¶
TechPreview
Warning
This procedure is valid for MOSK clusters that use the MiraCeph custom
resource (CR), which is available since MOSK 25.2 to replace the unsupported
KaaSCephCluster resource. And MiraCeph will be automatically migrated
to CephDeployment in MOSK 26.1. For details, see Deprecation Notes:
KaaSCephCluster API on management clusters.
For the equivalent procedure with the unsupported KaaSCephCluster CR, refer
to the following section:
Warning
Performance testing affects the overall Ceph cluster performance. Do not run it unless you are sure that user load will not be affected.
This section describes how to create a Ceph performance test request through
the CephPerfTestRequest CR.
To create a Ceph performance test request:
Create an RBD image with the required parameters. For example, run the following command in
rook-ceph-toolspod to allow execution of theperftestexample below on a MOSK cluster:kubectl exec -ti -n rook-ceph deploy/rook-ceph-tools -- bash rbd create <pool_name>/<image_name> --size 10G
Substitute
<pool_name>and<image_name>with pool and image names, and specify the size. In the example below,mirablock-k8s-block-hddis used as pool name andtestsas image name:kubectl exec -ti -n rook-ceph deploy/rook-ceph-tools -- bash rbd create mirablock-k8s-block-hdd/tests --size 10G
Create a YAML template for the
CephPerfTestRequestCR. For details, see CephPerfTestRequest CR perftest specification.kubectl apply -f <example_file_name>.yaml
Example of the
CephPerfTestRequestresourceapiVersion: lcm.mirantis.com/v1alpha1 kind: CephPerfTestRequest metadata: name: test-perf-req namespace: ceph-lcm-mirantis spec: parameters: - --ioengine=rbd - --pool=mirablock-k8s-block-hdd - --rbdname=tests - --name=single_perftest - --rw=randrw:16k - --rwmixread=40 - --bs=4k - --size=500M - --iodepth=32 - --numjobs=8 - --group_reporting - --direct=1 - --fsync=32 - --buffered=0 - --exitall
Review the
CephPerfTestRequeststatus. For details, see CephPerfTestRequest perftest status.kubectl -n ceph-lcm-mirantis get cephperftestrequest test-mosk-req
Example of system response:
NAME AGE PHASE START TIME DURATION JOB STATUS SCHEDULE REFERENCE REFERENCE NAMESPACE test-perf-req 2m25s Finished 2025-01-16T13:51:00Z 9m15s Completed job/test-perf-req-cephperftest rook-ceph
Review the performance test result by inspecting logs for the corresponding job Pod on the MOSK cluster:
kubectl -n rook-ceph logs -l app=ceph-perftest,perftest=<name>
Substitute
<name>with theCephPerfTestRequestmetadata.name, for example,test-perf-req.Optional. Remove the
CephPerfTestRequest:kubectl -n ceph-lcm-mirantis get cephperftestrequest test-mosk-req