tool
Dbench
- Github.com/leeliu/dben…
usage
-
Edit the storageClassName in the dbench. Yaml file to match your own Storage Class.
kubectl get storageclasses Copy the code
-
The deployment of
kubectl apply -f dbench.yaml Copy the code
-
Once deployed, Dbench Job will:
- use
storageClassName: ssd
(Default) provided1000Gi
(Default) persistent volume. - Run a series on the newly configured disk
fio
The test. - There are currently
9
One test at a time15
Seconds – Total running time is approximately2.5
Minutes.
- use
-
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.
-
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)
-
After the test is complete, clean up:
kubectl delete -f dbench.yaml Copy the code
Precautions/Troubleshooting
- if
Persistent Volume Claim
Stuck inPending
It is likely that you did not specify a valid storage class (Storage Class
). usekubectl get storageclasses
Double 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 UI
将Dbench Job
It is displayed in red until the volume is configured. - Testing multiple disk sizes is useful because most cloud providers press per
GB
Configuration of theIOPS
Pricing. As a result,4000Gi
Volume performance is likely to be better than1000Gi
Volume. Retest, just edityaml
.kubectl delete -f dbench.yaml
And in thedeprovision/delete
Run it again when donekubectl apply -f dbench.yaml
. - all
fio
All the tests are heredocker-entrypoint.sh
In 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
-
kubectl get storageclass
-
vi dbench.yaml
-
kubectl apply -f dbench.yaml
-
kubectl logs -f job/dbench
-
kubectl delete -f dbench.yaml