Skip to content

Commit d8dab1b

Browse files
authored
Merge pull request #316 from perezjosibm/wip.fio_workloads
Update documentation. Minor reformating on the fio-parse-jsons.py
2 parents cc15062 + 9cbdafb commit d8dab1b

File tree

9 files changed

+349
-172
lines changed

9 files changed

+349
-172
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Optional tools and benchmarks can be used if desired:
7777
6. fio - benchmark suite with integrated posix, libaio, and librbd
7878
support
7979
7. cosbench - object storage benchmark from Intel
80+
8. pytest - to run the unit tests.
8081

8182
## USER AND NODE SETUP
8283

@@ -144,10 +145,12 @@ lab here:
144145
<https://github.com/ceph/cbt/blob/master/tools/mkpartmagna.sh>
145146

146147

147-
## CREATING A YAML FILE
148+
## CREATING A TEST PLAN YAML FILE
148149

149150
CBT yaml files have a basic structure where you define a cluster and a set of
150-
benchmarks to run against it. For example, the following yaml file creates a
151+
benchmarks to run against it. The high level structure of a test plan is
152+
detailed in the [documentation](docs/TestPlanSchema.md).
153+
For example, the following yaml file creates a
151154
single node cluster on a node with hostname "burnupiX". A pool profile is
152155
defined for a 1x replication pool using 256 PGs, and that pool is used to run
153156
RBD performance tests using fio with the librbd engine.
@@ -250,6 +253,15 @@ called mkcephconf.py lets you automatically generate hundreds or thousands of
250253
ceph.conf files from defined ranges of different options that can then be used
251254
with cbt in this way.
252255

256+
## RECENT FEATURES
257+
258+
* Support for [workloads](docs/Workloads.md), that is sequence of performance tests, particularly
259+
useful to generate *Response latency curves*.
260+
261+
* Automatic unit test [generation](docs/AutomaticUnitTestGeneration.md) for the Benchmark classes, intended to help
262+
refactoring to detect regressions.
263+
264+
253265
## CONCLUSION
254266

255267
There are many additional and powerful ways you can use cbt that are not yet

docs/AutomaticUnitTestGeneration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The following is an example of the execution of the script:
2222
```
2323
An example of the expected normal ouput is shown below.
2424

25-
![cbt_utests_gen](cbt_utest_gen.png)
25+
![cbt_utests_gen](./cbt_utests_gen.png)
2626

2727
This would have created (or updated if existing already) the set of unit tests for the supported benchmarks.
2828

@@ -35,7 +35,7 @@ The unit tests can be executed from the command line as follows:
3535
```
3636
An example output showing a successful execution:
3737

38-
![cbt_utests_gen](cbt_utest_gen.png)
38+
![cbt_utests_run](./cbt_utests_run.png)
3939

4040
Note: the tests skipped above require an environment variable to be defined to identify the target nodes
4141
for exercising pdsh.
@@ -69,7 +69,7 @@ whether some attributes has been changed, replaced or deleted. This is especiall
6969
during code refactoring.
7070

7171

72-
## Workflow recommeded
72+
## Workflow recommeded
7373

7474

7575
* Before starting a code refactoring effort, run the unit tests: they should all pass as shown above.

docs/TestPlanSchema.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Test plan schema
2+
3+
A valid test plan .yaml consists of the following compulsory sections at the top level (the level is
4+
indicated by the indentation in .yaml: the top level has 0 indentation):
5+
6+
* `cluster`
7+
* `benchmarks`.
8+
9+
It may also have the following optional sections at the same level:
10+
11+
* `monitoring_profile`
12+
* `client_endpoints`.
13+
14+
![top_level](./toplevel.png)
15+
16+
## `cluster`
17+
18+
The cluster section enumerates the components of the Ceph cluster relevant to CBT. There are two
19+
general classes of components:
20+
21+
* scalars: for example names whose value is a string, a numeric or a boolean;
22+
* collections: components that in turn contain further information, for example profile of pool
23+
replication.
24+
25+
The following are scalar compulsory entities:
26+
* a head node: this is a string indicating the node that starts the cluster.
27+
* a list of clients, each a string, representing a ssh-reachable host that has a benchmark
28+
executable installed,
29+
* a list of osds nodes, each of which has at least a running OSD process.
30+
31+
![cluster](./cluster.png)
32+
33+
34+
## `benchmarks`
35+
36+
The benchmarks section consists of a non-empty list of collections, each describing a benchmark
37+
entity.
38+
39+
* A benchmark entity starts with its *name* (second level indentation), valid names are for example:
40+
`radosbench`, `hsbench`, `kvmrbdfio`, `librbdfio`, etc.
41+
42+
* The contents of the benchmark entity (third level indentation) consist of a collection of items
43+
(either scalars or collections themselves). Most of these entities represent options for the
44+
command line invocation of the benchmark when executed by the clients.
45+
46+
![benchmarks](./benchmarks.png)
47+
48+
49+
## `monitoring_profiles`
50+
51+
52+
The monitoring_profiles section consists of a non-empty list of of collections, each describing a
53+
monitoring tool.
54+
55+
A monitoring entity starts with its name (at second level indentation). Currently supported are `perf`
56+
, `collectl`, `top`.
57+
58+
The contents of the monitoring entity consists of :
59+
* a `nodes` (third level indentation) list of processes to monitor (by default the osd nodes), and
60+
* an optional string `args` (third level indentation) to indicate the arguments to the monitoring tool.
61+
62+
63+
## `client_endpoints`
64+
65+
The client_endpoints section consists of a non-empty list of collections, each associated to a
66+
benchmark entity, and typically indicating the driver for the benchmark. The client_endpoints, if
67+
specified on a test plan, must be cross referenced by the benchmark section, and as such normally the
68+
client_endpoints section precedes the benchmarks section in the test plan.
69+
70+
See the dir `example/` for a number of test plan examples.

docs/Workloads.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Workloads
2+
3+
A workload is the specification of a sequence of tests to be executed in the order given.
4+
Typically this involves a *range* of values for a specific benchmark argument. The most used is
5+
the *queue depth*. Depending of the benchmark, this can be expressed as a function of the number
6+
of jobs (or threads, or processes), such that the increase number of these causes a proportional
7+
increase in the I/O. Specifiying workloads in this way permits to generate *response latency curves*
8+
from the results.
9+
10+
The workload feature is currently supported for `librbdfio` only.
11+
12+
![workloads](./workloads.png)
13+
14+
* A `workloads` section is composed by a non-empty collection. Each item in the workload has a free name,
15+
and contains in turn a collection of valid options with values for the benchmark.
16+
* For each of the `iodepth` and `numjobs` options, a range of integer values is permitted.
17+
18+
During execution, any of the given values for the benchmark options in the global section are overwritten
19+
by the given values within the current test workload. The global values are restored once the workload test
20+
completes.
21+
22+
As an example, the following specifies two workloads:
23+
24+
* the first is named `precondition` and consists of executing a random write over a queue depth of 4,
25+
(that is, the product of numjobs and iodepth), and indicates that monitoring should be disabled during the
26+
execution of the workload,
27+
* the second is named test1, and specifies a random read over the combinatorial of the provided sequences for
28+
the numjobs and iodepth, resp. That is, (1,1), (1,4), (1,8) .. (8,8).
29+
30+
31+
```yaml
32+
33+
workloads:
34+
precondition:
35+
jobname: 'precond1rw'
36+
mode: 'randwrite'
37+
numjobs: [ 1 ]
38+
iodepth: [ 4 ]
39+
monitor: False # whether to run the monitors along the test
40+
test1:
41+
jobname: 'rr'
42+
mode: 'randread'
43+
numjobs: [ 1, 4, 8 ]
44+
iodepth: [ 1, 4, 8 ]
45+
46+
```

docs/benchmarks.png

21.3 KB
Loading

docs/cluster.png

24.3 KB
Loading

docs/toplevel.png

14.1 KB
Loading

docs/workloads.png

9.55 KB
Loading

0 commit comments

Comments
 (0)