Create a Ceph performance test request¶
TechPreview
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 KaaSCephOperationRequest
CR.
To create a Ceph performance test request:
Create an RBD image with the required parameters. For example, run the following command in
ceph-tools-container
to allow execution of theperftest
example below on a managed cluster:kubectl exec -ti -n rook-ceph <ceph-tools-pod> -- bash rbd create <pool_name>/<image_name> --size 10G
Substitute
<ceph-tools-pod>
with theceph-tools
Pod ID,<pool_name>
and<image_name>
with pool and image names, and specify the size. In the example below,mirablock-k8s-block-hdd
is used as pool name andtests
as image name:kubectl exec -ti -n rook-ceph rook-ceph-tools-94985cd9f-tjl29 -- bash rbd create mirablock-k8s-block-hdd/tests --size 10G
Create a
.yaml
template for theKaaSCephOperationRequest
CR. For details, see KaaSCephOperationRequest CR perftest specification.kubectl apply -f <example_file_name>.yaml
Example of the
KaaSCephOperationRequest
resourceapiVersion: kaas.mirantis.com/v1alpha1 kind: KaaSCephOperationRequest metadata: name: test-perf-req namespace: managed-ns spec: kaasCephCluster: name: ceph-kaas-managed namespace: managed-ns perfTest: 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
KaaSCephOperationRequest
status. For details, see KaaSCephOperationRequest perftest status.kubectl get kaascephoperationrequest test-managed-req -n managed-ns
Example of system response:
NAME KAASCEPHCLUSTER CLUSTER AGE PHASE MESSAGE test-perf-req ceph-kaas-managed kaas-managed 20m Completed
Review the
CephPerfTestRequest
status on the managed cluster.kubectl get cephperftestrequest -n ceph-lcm-mirantis
Example of system response:
NAME AGE PHASE START TIME DURATION JOB STATUS SCHEDULE test-perf-req 55m Finished 2022-06-17T09:29:57Z 5m53s Completed
Review the performance test result by inspecting logs for the corresponding job Pod on the managed cluster:
kubectl --kubeconfig <managedKubeconfig> -n rook-ceph logs -l app=ceph-perftest,perftest=<name>
Substitute
<managedKubeconfig>
with the managed clusterkubeconfig
and<name>
with theKaaSCephOperationRequest
metadata.name
, for example,test-perf-req
.Optional. Remove the
KaaSCephOperationRequest
. Removal ofKaaSCephOperationRequest
also removes theCephPerfTestRequest
CR propagated to the managed cluster.