tool

Dbench

  • Github.com/leeliu/dben…

usage

  1. Edit the storageClassName in the dbench. Yaml file to match your own Storage Class.

    kubectl get storageclasses
    Copy the code
  2. The deployment of

    kubectl apply -f dbench.yaml
    Copy the code
  3. Once deployed, Dbench Job will:

    • usestorageClassName: ssd(Default) provided1000Gi(Default) persistent volume.
    • Run a series on the newly configured diskfioThe test.
    • There are currently9One test at a time15Seconds – Total running time is approximately2.5Minutes.
  4. Track benchmark progress using the following methods:

    kubectl logs -f job/dbench
    Copy the code

    Empty output indicates that the job has not been created or storageClassName is invalid. See troubleshooting below.

  5. At the end of all tests, you will see a summary similar to the following:

    = = = = = = = = = = = = = = = = = = = Dbench Summary = = = = = = = = = = = = = = = = = = = the Random Read/Write IOPS: 75.7 k / 59.7 k. BW: 523MiB/ S / 500MiB/s Average Latency (USEC) Read/Write: 183.07/76.91 Sequential Read/Write: 536MiB/ S / 512MiB/ S Mixed Random Read/Write IOPS: 43.1K / 14.4KCopy the code

    Dbench summary results

    • Random Read/Write IOPS(Random read and write)
    • BW(bandwidth)
    • Average Latency (usec) Read/Write(Average read/write latency)
    • Sequential Read/Write(Sequential reading/writing)
    • Mixed Random Read/Write IOPS(Mixed random read/write)
  6. After the test is complete, clean up:

    kubectl delete -f dbench.yaml
    Copy the code

Precautions/Troubleshooting

  • ifPersistent Volume ClaimStuck inPendingIt is likely that you did not specify a valid storage class (Storage Class). usekubectl get storageclassesDouble check. Also check whether the volume size used for the configuration is1000Gi(Default value).
  • It may take some time to bind persistent volumes,Kubernetes Dashboard UIDbench JobIt is displayed in red until the volume is configured.
  • Testing multiple disk sizes is useful because most cloud providers press perGBConfiguration of theIOPSPricing. As a result,4000GiVolume performance is likely to be better than1000GiVolume. Retest, just edityaml.kubectl delete -f dbench.yamlAnd in thedeprovision/deleteRun it again when donekubectl apply -f dbench.yaml.
  • allfioAll the tests are heredocker-entrypoint.shIn the.
    • Testing Read IOPS…
    • Testing Write IOPS…
    • Testing Read Bandwidth…
    • Testing Write Bandwidth…
    • Testing Read Latency…
    • Testing Write Latency…
    • Testing Read Sequential Speed…
    • Testing Write Sequential Speed…
    • Testing Read/Write Mixed…

Tencent cloud K8S cluster production actual combat

  1. kubectl get storageclass

  2. vi dbench.yaml

  3. kubectl apply -f dbench.yaml

  4. kubectl logs -f job/dbench

  5. kubectl delete -f dbench.yaml