You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/working-with-benk-a-storage-provisioning-and-io-performance-benchmark-suite-for-kubernetes.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,15 +33,15 @@ Some pro-efficiency working with scripts, JSON and Kubernetes is helpful to bett
33
33
34
34
# Hello Benk!
35
35
36
-
The synopsis section of Benk on GitHub highlights the main steps to run the default job. It’s a good measure stick to understand if the lights come on and determine if the system under test is ready for a more complex job.
36
+
The synopsis section of Benk on GitHub highlights the main steps to run the default job. It's a good measuring stick one can use to understand if the lights come on and determine if the system under test is ready for a more complex job.
37
37
38
-
Let’s walk through each step and explain as we go along. Descriptions are below the commands unless noted.
38
+
I'll walk you through each step and explain more as I go along. Descriptions are below the commands unless noted.
39
39
40
40
```text
41
41
git clone https://github.com/hpe-storage/benk && cd benk
42
42
```
43
43
44
-
Cloning and entering the benk directory is now considered your home. Your logs will go into `logs`, your workload configurations are in `kustomize/overlays` and the Jinja2 templates are in `jinja2`.
44
+
Cloning and entering the `benk` directory is now considered your home. Your logs will go into `logs`, your workload configurations are in `kustomize/overlays` and the Jinja2 templates are in `jinja2`.
The two “dist” files are the base of your configuration. A `config.env` file that contains information that will be inserted into the `StorageClass``Secret` reference. While the base configuration is heavily biased towards the HPE CSI Driver for Kubernetes, any storage driver that uses a `StorageClass` for dynamic provisioning for filesystems `Persistent Volume Claims` (PVC) can be used. Using the `storageclass.yaml` to configure your driver and pertinent details is at your discretion.
57
+
The two “dist” files are the base of your configuration. A `config.env` file that contains information about your storage backend that will be inserted into the `StorageClass``Secret` reference. While the base configuration is heavily biased towards the HPE CSI Driver for Kubernetes, any storage driver that uses a `StorageClass` for dynamic provisioning for filesystems `Persistent Volume Claims` (PVC) can be used. Using the `storageclass.yaml` to configure your driver and pertinent details is at your discretion.
This will create the default job and wait for it to complete. It runs a 80/20 read/write random 8K workload for 30 seconds on a single replica `Deployment` using a single `PVC`.
70
+
This will create the default job. Wait for it to complete. It runs a 80/20 read/write random 8K workload for 30 seconds on a single replica `Deployment` using a single `PVC`.
71
71
72
72
```text
73
73
kubectl logs -n benk job/benk | jq
74
74
```
75
75
76
-
This will render the log in pretty JSON. The log is pretty substantial and intentionally left out from the blog. An example log entry from the above job is available [on GitHub](https://github.com/hpe-storage/benk/tree/main/jinja2).
76
+
This will render the log in colorized and indented JSON. The log is pretty substantial and intentionally left out from the blog. An example log entry from the above job is available [on GitHub](https://github.com/hpe-storage/benk/tree/main/jinja2).
77
77
78
-
There’s also tiny output template provided in the repository `jinja2/example-default.yaml.j2` that pulls some data out of the log file.
78
+
There’s also a tiny output template provided in the repository `jinja2/example-default.yaml.j2` that pulls some data out of the log file.
Now we’ve completed the three corners of running Benk. Configured the environment and a job, ran the job successfully and distilled the results into something human readable for our demonstration.
94
+
Congratulations. You've just completed the three corners of running Benk. You've configured the environment and a job, ran the job successfully and distilled the results into something more easily readable by humans for our demonstration.
95
95
96
96
# The sequencer
97
97
98
-
The core of Benk for now, is to run preconfigured jobs with kustomize. It may seem a lot of work for very little output. That’s why the repository contain two important scripts, `sequencer.sh` and `sequencer-cluster.sh`. These scripts will help you run multiple jobs and structure the output to create more meaty reports.
98
+
The core of Benk, for now, is to run preconfigured jobs with kustomize. It may seem like a lot of work for very little output. That’s why the repository contain two important scripts, `sequencer.sh` and `sequencer-cluster.sh`. These scripts will help you run multiple jobs and structure the output to create more meaty reports.
99
99
100
100
First, copy the “default” kustomize directory into eight separate directories.
101
101
@@ -109,17 +109,17 @@ Now, edit each `config.env` in each directory. I use `vi` to “:wn” myself th
109
109
vi kustomize/overlays/mytest-*/config.env
110
110
```
111
111
112
-
In each iteration, we’ll double `workloadThreads` so we end up with a sequence like 1, 2, 4, 8, 16, 32, 64 and 128. Would it not be useful if we could run these in sequence and report the results in the same template we used previously to understand if the system scales to when adding more threads to the workload? (The entire demo environment runs in virtual machines on decadeold hardware, please don’t judge.)
112
+
In each iteration, double `workloadThreads` so you end up with a sequence like 1, 2, 4, 8, 16, 32, 64 and 128. Would it not be useful to run these in sequence and report the results in the same template used previously to understand if the system scales to when adding more threads to the workload? (The entire demo environment runs in virtual machines on decade-old hardware, so please don’t judge.)
113
113
114
114
Run the sequence:
115
115
116
116
```text
117
117
./sequencer.sh mytest-
118
118
```
119
119
120
-
What happens here is that the sequencer script will use globbing to find all overlays that has the prefix “mytest-”. Be mindful how you name things to avoid unexpected jobs to be executed.
120
+
What happens here is that the sequencer script will use globbing to find all overlays that have the prefix “mytest-”. Be mindful of how you name things to avoid unexpected jobs to be executed.
121
121
122
-
Next we can use the same report for all the jobs.
122
+
Note that the same report can be used for all the jobs.
We can now observe that we’re seeing diminishing returns by adding more than 16 threads to this workload.
173
+
Observe that it shows diminishing returns by adding more than 16 threads to this workload.
174
174
175
175
# A/B comparison
176
176
177
-
A/B testing is something that has gained popularity in human interaction testing for websites. This is also a crucial testing methodology to analyze systems performance by simply changing a single parameter and rerun the exact same test to compare the outcomes. We’re in luck as Benk allows reporting on two log files at once with just a slightly different data structures being fed to the Jinja2 templates.
177
+
A/B testing is something that has gained popularity in human interaction testing for websites. This is also a crucial testing methodology used to analyze systems performance by simply changing a single parameter and rerunning the exact same test to compare the outcomes. We’re in luck as Benk allows reporting on two log files at once with just a slightly different data structures being fed to the Jinja2 templates.
178
178
179
-
Let’s change block size for our previous workload example. We’re going to summarize if increasing the block size will increase the bandwidth for the workload.
179
+
Now, change the block size for the previous workload example. We’re going to test out if increasing the block size will increase the bandwidth for the workload.
180
180
181
181
Change the “workloadBlockSize” to “64k” with the `vi` ceremony.
182
182
@@ -190,13 +190,13 @@ Re-run the sequencer.
190
190
./sequencer.sh mytest-
191
191
```
192
192
193
-
We’ll have to use a different template as Jinja2 now has to deal with managing two log files at a time. The syntax for the `outputter.py` script is also slightly different.
193
+
You'll have to use a different template, as Jinja2 now has to deal with managing two log files at a time. The syntax for the `outputter.py` script is also slightly different.
194
194
195
195
```text
196
196
./src/benk/outputter.py -a logs/run-mytest-<unique timestamp>.log -b logs/run-mytest-<unique timestamp>.log -t jinja2/example-default-ab.md.j2
197
197
```
198
198
199
-
This report template will summarize the findings in a markdown table, suitable to include in a GitHub pull request or similar to illustrate a certain discovery.
199
+
This report template will summarize the findings in a markdown table suitable to include in a GitHub pull request or similar to illustrate a certain discovery.
0 commit comments