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:

  1. Create an RBD image with the required parameters. For example, run the following command in ceph-tools-container to allow execution of the perftest 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 the ceph-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 and tests as image name:

    kubectl exec -ti -n rook-ceph rook-ceph-tools-94985cd9f-tjl29 -- bash
    rbd create mirablock-k8s-block-hdd/tests --size 10G
    
  2. Create a .yaml template for the KaaSCephOperationRequest CR. For details, see KaaSCephOperationRequest CR perftest specification.

    kubectl apply -f <example_file_name>.yaml
    
    Example of the KaaSCephOperationRequest resource
    apiVersion: 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
    
  3. 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
    
  4. 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
    
  5. 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 cluster kubeconfig and <name> with the KaaSCephOperationRequest metadata.name, for example, test-perf-req.

  6. Optional. Remove the KaaSCephOperationRequest. Removal of KaaSCephOperationRequest also removes the CephPerfTestRequest CR propagated to the managed cluster.