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
{{ message }}
Repository navigation
Commit 8395e72
Browse filesBrowse the repository at this point in the historyBrowse files
Licensed to the Apache Software Foundation (ASF) under one
3
+
or more contributor license agreements. See the NOTICE file
4
+
distributed with this work for additional information
5
+
regarding copyright ownership. The ASF licenses this file
6
+
to you under the Apache License, Version 2.0 (the
7
+
"License"); you may not use this file except in compliance
8
+
with the License. You may obtain a copy of the License at
9
+
10
+
http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+
Unless required by applicable law or agreed to in writing,
13
+
software distributed under the License is distributed on an
14
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+
KIND, either express or implied. See the License for the
16
+
specific language governing permissions and limitations
17
+
under the License.
18
+
-->
19
+
# ONTAP scale benchmark
20
+
21
+
- Refer to the scale matrix from `README.md` and `USAGE.md` only.
22
+
- Protocols, checkpoints, and concurrency levels live in `config.yaml`. `run.py` is the entry point. Do not add a CLI flag for a field that already exists in config.
23
+
- Use `benchmark_support` for run ids, resource names, `mean_seconds`, and logging. Sequential and concurrency scripts must use the same helpers and the same log format. Do not hand-roll a second average or a second logger.
24
+
- Run ids are letters, digits, and underscores. Storage pool names disallow `-`. VM hostnames disallow `_`; `format_vm_name` / `vm_name_token` are the only rewrite, and cleanup must use them so created VMs are the ones deleted.
25
+
- Cleanup must stay inside the configured name prefix, zone, cluster (pools), and storage provider. Do not delete a resource just because its name contains a short substring.
Copy file name to clipboardExpand all lines: private-cicd/benchmark/ontap/USAGE.md
+22-14Lines changed: 22 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ cluster IDs, and ONTAP connection details (see inline comments in
71
71
72
72
| File | Purpose |
73
73
|---|---|
74
+
|`benchmark_support.py`| Shared run ids, resource names, `mean_seconds`, and the one log format used by every script. |
74
75
|`cloudstack_client.py`| Minimal CloudStack HTTP/REST client (session-key login, generic `call()`, automatic `queryAsyncJobResult` polling). Used by every benchmark script. |
75
76
|`storage_pool_common.py`| Shared helpers for the storage-pool scripts: `createStoragePool`/`deleteStoragePool` request building, CSV logging (`RawLogger`, `append_summary_csv`), cleanup-by-filter, config loading. |
76
77
|`vm_instance_common.py`| Shared helpers for the VM-instance scripts: `deployVirtualMachine`/`destroyVirtualMachine` request building (incl. force-purging data disks and `Destroy`-state volumes so ONTAP space is reclaimed immediately instead of waiting for CloudStack's 24h cleanup delay), CSV logging, cleanup-by-filter, config loading. |
|`benchmark_storage_pool_sequential.py`| Creates storage pools one at a time (per protocol) up to N=30, then deletes them one at a time, logging every call and reporting checkpoint totals at N = 1, 5, 10, 20, 30. |`python3 benchmark_storage_pool_sequential.py --config config.yaml`|
86
-
|`benchmark_storage_pool_concurrency.py`| For each concurrency level C (default 2, 5, 10, 20, 30), creates C pools in parallel via a thread pool, records wall-clock time for the whole batch, then deletes the same C pools in parallel. |`python3 benchmark_storage_pool_concurrency.py --config config.yaml`|
86
+
|`run.py`| Entry point. Loads `config.yaml` and runs the test named by `--test`. |`python3 run.py --test storage-pool-sequential --config config.yaml`|
87
+
|`benchmark_storage_pool_sequential.py`| Creates storage pools one at a time (per protocol) up to N=30, then deletes them one at a time, logging every call and reporting checkpoint totals at N = 1, 5, 10, 20, 30. |`python3 run.py --test storage-pool-sequential --config config.yaml`|
88
+
|`benchmark_storage_pool_concurrency.py`| For each concurrency level C (default 2, 5, 10, 20, 30), creates C pools in parallel via a thread pool, records wall-clock time for the whole batch, then deletes the same C pools in parallel. |`python3 run.py --test storage-pool-concurrency --config config.yaml`|
87
89
88
90
Common flags (both scripts):
89
91
90
92
| Flag | Meaning |
91
93
|---|---|
92
-
|`--config PATH`| Config YAML to use (default `config.yaml`). |
93
-
|`--protocol {nfs3,iscsi,both}`| Restrict the run to one protocol (default `both`). |
94
-
|`--run-id ID`| Reuse a specific run id (auto-generated otherwise) - use the **same id** across the sequential and concurrency scripts to merge both into one `summary_<run_id>.csv`/report. |
94
+
|`--config PATH`| Config YAML to use (default `config.yaml`). Protocols, checkpoints, and concurrency levels are read from here. |
95
+
|`--run-id ID`| Reuse a run id. Auto-generated otherwise as `RUN_<UTC timestamp>_<4 hex chars>`. Letters, digits, and underscores only — a hyphen is rewritten to `_` because storage-pool names (and the ONTAP volume behind them) disallow `-`. Use the **same id** across sequential and concurrency to merge one report. |
95
96
|`--dry-run`| Simulate timings with no real API calls - use this first to sanity-check your config. |
96
97
|`--skip-cleanup`| Skip the automatic post-run sweep for leftover pools from this run id. |
97
-
|`--cleanup-only [FILTER]`| Don't run the benchmark - just delete every pool whose name contains `FILTER` (default: config's `pool_name_prefix`) and exit. Use this to recover after a crashed run. |
98
-
|`--levels 2,5,10`|*(concurrency script only)* Override the concurrency levels to run instead of the config's `concurrency_levels`. |
98
+
|`--cleanup-only [FILTER]`| Don't run the benchmark. Delete pools that match `FILTER` (default: config's `pool_name_prefix`) **and** this config's name pattern, zone, cluster, and storage provider. |
99
+
100
+
`run.py` also requires `--test`. Protocols, checkpoints, and concurrency levels are not flags; change them in `config.yaml`.
101
+
102
+
| Flag | Meaning |
103
+
|---|---|
104
+
|`--test NAME`| Required. `storage-pool-sequential`, `storage-pool-concurrency`, `vm-instance-sequential`, `vm-instance-concurrency`, or `vm-instance-combined`. |
99
105
100
106
## 4. VM-instance benchmark scripts
101
107
@@ -121,13 +127,15 @@ VM getting both a root disk and a data disk on the same tagged pool.
121
127
122
128
| Script | What it does | Typical command |
123
129
|---|---|---|
124
-
|`benchmark_vm_instance_sequential.py`| Deploys VMs one at a time (per protocol) up to N=30, then destroys them one at a time, reporting checkpoint totals at N = 1, 2, 5, 10, 20, 30. |`python3 benchmark_vm_instance_sequential.py --config config.yaml`|
125
-
|`benchmark_vm_instance_concurrency.py`| For each concurrency level C, deploys C VMs in parallel, records wall-clock time, then destroys the same C VMs in parallel. |`python3 benchmark_vm_instance_concurrency.py --config config.yaml`|
126
-
|`benchmark_vm_instance_combined.py`| Runs the sequential matrix immediately followed by the concurrency matrix, under one shared run id, in a single invocation. Use once you already trust your config/environment. |`python3 benchmark_vm_instance_combined.py --config config.yaml`|
130
+
|`benchmark_vm_instance_sequential.py`| Deploys VMs one at a time (per protocol) up to N=30, then destroys them one at a time, reporting checkpoint totals at N = 1, 2, 5, 10, 20, 30. |`python3 run.py --test vm-instance-sequential --config config.yaml`|
131
+
|`benchmark_vm_instance_concurrency.py`| For each concurrency level C, deploys C VMs in parallel, records wall-clock time, then destroys the same C VMs in parallel. |`python3 run.py --test vm-instance-concurrency --config config.yaml`|
132
+
|`benchmark_vm_instance_combined.py`| Runs the sequential matrix immediately followed by the concurrency matrix, under one shared run id, in a single invocation. Use once you already trust your config/environment. |`python3 run.py --test vm-instance-combined --config config.yaml`|
127
133
128
134
Common flags: same as the storage-pool scripts above (`--config`,
VM cleanup rewrites `_` in the filter to `-` so it matches the hostname
137
+
form of the run id, and it only destroys VMs in the configured zone whose
138
+
names match the benchmark prefix and pattern. Failed
131
139
`deployVirtualMachine` calls are intentionally **left in place** (not
132
140
auto-destroyed) so you can inspect what got left behind - clean them up
133
141
with `--cleanup-only` once done.
@@ -136,14 +144,14 @@ with `--cleanup-only` once done.
136
144
137
145
| Script | What it does | Typical command |
138
146
|---|---|---|
139
-
|`render_report.py`| Turns a run's `raw_ops_<run_id>.csv` + `summary_<run_id>.csv` into Confluence-ready markdown tables (matches the page's section layout, plus Min/Avg/P95/Max rows for the Results Log). Writes to stdout and to `results/report_<run_id>.md`. |`python3 render_report.py --run-id RUN-0001 --cloudstack-build 4.23.0.0-SNAPSHOT --ontap-version 9.17.1`|
147
+
|`render_report.py`| Turns a run's `raw_ops_<run_id>.csv` + `summary_<run_id>.csv` into markdown tables (section layout plus Min/Avg/P95/Max rows for the Results Log). Writes to stdout and to `results/report_<run_id>.md`. |`python3 render_report.py --run-id RUN_20260927_081500_a1b2 --cloudstack-build 4.23.0.0-SNAPSHOT --ontap-version 9.17.1`|
140
148
141
149
For VM-instance runs (which write `raw_ops_vm_<run_id>.csv` /
142
150
`summary_vm_<run_id>.csv` instead of the storage-pool scripts' `raw_ops_`/
0 commit comments