Skip to content

Commit 6d23d4b

Browse files
committed
workflows: add fio-tests performance tests
I had written fio-tests [0] a long time ago but although it used Kconfig, at that point I had lacked the for-sight of leveraging jinja2 / ansible to make things more declarative. It's been on my back log to try to get that ported over to kdevops but now with Claude Code, it just required a series of prompts. And its even better now. *This* is how we scale. I've added a demo tree which just has the graphs for those just itching to see what this produces [1]. It's just a demo comparing 6.15.0 vs 6.16.0-rc7 so don't get too excited as its just a silly guest with virtio drives. However this should hopefully show you how easily and quickly with the new A/B testing feature I just posted (not yet merged, but that this series depends on) we can do full performance analysis. The run time for tests is configurable, you also use the FIO_QUICK environment variable to do quick tests. The runtime choices are: - Default: 60 seconds runtime, 10 seconds ramp time - Quick: 10 seconds runtime, 2 seconds ramp time (selected with FIO_QUICK=y) - Custom High: 300 seconds runtime, 30 seconds ramp time - Custom Low: 5 seconds runtime, 1 second ramp time We add defconfig-fio-tests-perf which to enable all performance testing knobs: - All block sizes (4K, 8K, 16K, 32K, 64K, 128K) - All IO depths (1, 4, 8, 16, 32, 64) - All job counts (1, 2, 4, 8, 16) - All test patterns (random/sequential read/write, mixed workloads) - High DPI (300) for graphs - A/B testing with baseline and dev nodes This allows quick CI testing with: make defconfig-fio-tests-perf FIO_QUICK=y Or comprehensive performance testing with: make defconfig-fio-tests-perf Key features: - Configurable test matrix: block sizes (4K-128K), IO depths (1-64), job counts - Multiple workload patterns: random/sequential read/write, mixed workloads - Advanced configuration: IO engines, direct IO, fsync options - Performance logging: bandwidth, IOPS, and latency metrics - Baseline management and results analysis - FIO_TESTS_ENABLE_GRAPHING: Enable/disable graphing capabilities - Graph format, DPI, and theme configuration options - Updated CI defconfig with graphing support (150 DPI for faster CI) Key graphing features support: - Performance analysis: bandwidth heatmaps, IOPS scaling, latency distributions - A/B comparison: baseline vs development configuration analysis - Trend analysis: block size scaling, IO depth optimization, correlation matrices - Configurable output: PNG/SVG/PDF formats, DPI settings, matplotlib themes Documentation: - docs/fio-tests.md: Comprehensive workflow documentation covering: * Origin story and relationship to upstream fio-tests project * Quick start and configuration examples * Test matrix configuration and device setup * A/B testing and baseline management * Graphing and visualization capabilities * CI integration and troubleshooting guides * Best practices and performance considerations A minimal CI configuration (defconfig-fio-tests-ci) enables automated testing in GitHub Actions using /dev/null as the target device with a reduced test matrix for fast execution. We extend PROMPTS.md with prompts used for all this. Usage: make defconfig-fio-tests-ci # Simple CI testing make menuconfig # Interactive configuration make fio-tests # Run performance tests make fio-tests-baseline # Establish baseline make fio-tests-results # Collect results make fio-tests-graph # Generate performance graphs make fio-tests-compare # Compare baseline vs dev results make fio-tests-trend-analysis # Analyze performance trends Link: https://github.com/mcgrof/fio-tests # [0] Link: https://github.com/mcgrof/fio-tests-graphs-on-kdevops # [1] Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]>
1 parent abf5c40 commit 6d23d4b

File tree

31 files changed

+3028
-32
lines changed

31 files changed

+3028
-32
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ workflows/sysbench/results/
7070
workflows/mmtests/results/
7171
tmp
7272

73+
workflows/fio-tests/results/
74+
7375
playbooks/roles/linux-mirror/linux-mirror-systemd/*.service
7476
playbooks/roles/linux-mirror/linux-mirror-systemd/*.timer
7577
playbooks/roles/linux-mirror/linux-mirror-systemd/mirrors.yaml

PROMPTS.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,111 @@ source "workflows/mmtests/Kconfig.fs"
124124

125125
This separation is preferred as it helps us scale.
126126

127+
## Port an external project into kdevops
128+
129+
The fio-tests was an older external project however its more suitably placed
130+
into kdevops as jinja2 lets us easily scale this project. The projects also
131+
were authored by the same person and the same license was used. The porting
132+
took a few separate prompts as described below.
133+
134+
### Initial implementation of fio-tests workflow on kdevops
135+
136+
**Prompt:**
137+
Now that we merged steady state to kdevops -- now let's add specific target
138+
workflow support for different target different simple workflows. Learn from
139+
how sysbench added two guests so we can do A/B testing in two separate guests.
140+
The workflows you will focus on will be the workflows from
141+
https://github.com/mcgrof/fio-tests. We already took steady state and
142+
pre-conditioning from there so no need to do that. All we need to do is just
143+
now target the different other workflows. Leverage the Kconfig documentation we
144+
used on that project and adapt it to leverage output yaml on kdevops. Then also
145+
to help test things we can simply add a basic test so that
146+
.github/workflows/docker-tests.yml can run some tests using /dev/null as a
147+
target block device for just one simple workflow.
148+
149+
**AI:** Claude Code
150+
**Commit:** TDB
151+
**Result:** Excellent implementation with comprehensive workflow structure.
152+
**Grading:** 90%
153+
154+
**Notes:**
155+
156+
The implementation successfully:
157+
- Added complete fio-tests workflow with A/B testing support following sysbench patterns
158+
- Created comprehensive Kconfig structure with output yaml support for all options
159+
- Implemented configurable test matrices (block sizes, IO depths, job counts, patterns)
160+
- Added ansible role with template-based job generation
161+
- Integrated with main kdevops workflow system and makefiles
162+
- Created CI-optimized defconfig using /dev/null target device
163+
- Updated GitHub Actions workflow for automated testing
164+
165+
Minor areas for improvement:
166+
- Could have included more detailed help text in some Kconfig options
167+
- Template generation could be more dynamic for complex configurations
168+
- Didn't add documentation, which means we should extend CLAUDE.md to
169+
add documentation when adding a new workflow.
170+
- Did not pick up on the trend to prefer to have 'make foo-results' to always
171+
copy results locally.
172+
173+
### Extend fio-tests with graphing support
174+
175+
**Prompt:**
176+
The fio-tests project had support for graphing. Bring that over and add that to
177+
kdevops. I am the author of fio-tests so I own all the code. Be sure to use
178+
SPDX for my top header files with the copyleft-next license as is done with
179+
tons of code on kdevops.
180+
181+
**AI:** Claude Code
182+
**Commit:** TDB
183+
**Result:** Comprehensive graphing implementation with proper licensing.
184+
**Grading:** 95%
185+
186+
**Notes:**
187+
188+
Outstanding implementation that:
189+
- Improved upon the graphs I had originally had on fio-tests and actually
190+
innovated on some! Also took the initiative to do A/B performance analysis!
191+
- Created three comprehensive Python scripts with proper SPDX copyleft-next-0.3.1 headers
192+
- Implemented advanced graphing: performance analysis, A/B comparison, trend analysis
193+
- Added configurable graphing options through Kconfig (format, DPI, themes)
194+
- Included conditional dependency installation across distributions
195+
- Created ansible playbooks for automated graph generation
196+
- Added make targets for different types of analysis
197+
- Updated CI configuration with graphing support
198+
199+
The implementation perfectly followed kdevops patterns and demonstrated
200+
excellent understanding of the codebase structure. The graphing capabilities
201+
are comprehensive and production-ready.
202+
203+
### Add the fio-tests documentation
204+
205+
**Prompt:**
206+
Now add documentation for fio-tests on kdevops. Extend README.md with a small
207+
section and point to its own documentation file. You can use the upstream
208+
fio-tests https://github.com/mcgrof/fio-tests page for inspiration, but
209+
obviously we want to port this to how you've implemented support on kdevops.
210+
You can point back to the old https://github.com/mcgrof/fio-tests page as an
211+
origin story. Also extend PROMPTS.md with the few prompts I've given you to
212+
help add support for fio-tests and graphing support.
213+
214+
**AI:** Claude Code
215+
**Commit:** TDB
216+
**Result:** Comprehensive documentation with examples and troubleshooting.
217+
**Grading:** 90%
218+
219+
**Notes:**
220+
221+
The documentation implementation includes:
222+
- Updated README.md with fio-tests section linking to detailed documentation
223+
- Created comprehensive docs/fio-tests.md with full workflow coverage
224+
- Included origin story referencing original fio-tests framework
225+
- Added detailed configuration examples and troubleshooting guides
226+
- Documented all graphing capabilities with usage examples
227+
- Extended PROMPTS.md with the implementation prompts for future AI reference
228+
229+
This demonstrates the complete lifecycle of implementing a complex workflow in
230+
kdevops from initial implementation through comprehensive documentation.
231+
127232
## Kernel development and A/B testing support
128233

129234
### Adding A/B kernel testing support for different kernel versions

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Table of Contents
1313
* [CXL](#cxl)
1414
* [reboot-limit](#reboot-limit)
1515
* [sysbench](#sysbench)
16+
* [fio-tests](#fio-tests)
1617
* [kdevops chats](#kdevops-chats)
1718
* [kdevops on discord](#kdevops-on-discord)
1819
* [kdevops IRC](#kdevops-irc)
@@ -263,6 +264,15 @@ kdevops supports automation of sysbench tests on VMs with or without
263264
providers. For details refer to the
264265
[kdevops sysbench documentation](docs/sysbench/sysbench.md).
265266

267+
### fio-tests
268+
269+
kdevops includes comprehensive storage performance testing through the fio-tests
270+
workflow, adapted from the original [fio-tests framework](https://github.com/mcgrof/fio-tests).
271+
This workflow provides flexible I/O benchmarking with configurable test matrices,
272+
A/B testing capabilities, and advanced graphing and visualization support. For
273+
detailed configuration and usage information, refer to the
274+
[kdevops fio-tests documentation](docs/fio-tests.md).
275+
266276
## kdevops chats
267277

268278
We use discord and IRC. Right now we have more folks on discord than on IRC.

defconfigs/fio-tests-ci

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Minimal fio-tests configuration for CI testing
2+
# Workflow configuration
3+
CONFIG_WORKFLOWS=y
4+
CONFIG_WORKFLOWS_TESTS=y
5+
CONFIG_WORKFLOWS_LINUX_TESTS=y
6+
CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
7+
CONFIG_KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS=y
8+
9+
# fio-tests specific config for CI
10+
CONFIG_FIO_TESTS_PERFORMANCE_ANALYSIS=y
11+
CONFIG_FIO_TESTS_DEVICE="/dev/null"
12+
CONFIG_FIO_TESTS_RUNTIME="10"
13+
CONFIG_FIO_TESTS_RAMP_TIME="2"
14+
15+
# Minimal test matrix for CI
16+
CONFIG_FIO_TESTS_BS_4K=y
17+
CONFIG_FIO_TESTS_BS_8K=n
18+
CONFIG_FIO_TESTS_BS_16K=n
19+
CONFIG_FIO_TESTS_BS_32K=n
20+
CONFIG_FIO_TESTS_BS_64K=n
21+
CONFIG_FIO_TESTS_BS_128K=n
22+
23+
CONFIG_FIO_TESTS_IODEPTH_1=y
24+
CONFIG_FIO_TESTS_IODEPTH_4=n
25+
CONFIG_FIO_TESTS_IODEPTH_8=n
26+
CONFIG_FIO_TESTS_IODEPTH_16=n
27+
CONFIG_FIO_TESTS_IODEPTH_32=n
28+
CONFIG_FIO_TESTS_IODEPTH_64=n
29+
30+
CONFIG_FIO_TESTS_NUMJOBS_1=y
31+
CONFIG_FIO_TESTS_NUMJOBS_2=n
32+
CONFIG_FIO_TESTS_NUMJOBS_4=n
33+
CONFIG_FIO_TESTS_NUMJOBS_8=n
34+
CONFIG_FIO_TESTS_NUMJOBS_16=n
35+
36+
CONFIG_FIO_TESTS_PATTERN_RAND_READ=y
37+
CONFIG_FIO_TESTS_PATTERN_RAND_WRITE=n
38+
CONFIG_FIO_TESTS_PATTERN_SEQ_READ=n
39+
CONFIG_FIO_TESTS_PATTERN_SEQ_WRITE=n
40+
CONFIG_FIO_TESTS_PATTERN_MIXED_75_25=n
41+
CONFIG_FIO_TESTS_PATTERN_MIXED_50_50=n
42+
43+
CONFIG_FIO_TESTS_IOENGINE="io_uring"
44+
CONFIG_FIO_TESTS_DIRECT=y
45+
CONFIG_FIO_TESTS_FSYNC_ON_CLOSE=y
46+
CONFIG_FIO_TESTS_RESULTS_DIR="/data/fio-tests"
47+
CONFIG_FIO_TESTS_LOG_AVG_MSEC=1000
48+
49+
# Graphing configuration
50+
CONFIG_FIO_TESTS_ENABLE_GRAPHING=y
51+
CONFIG_FIO_TESTS_GRAPH_FORMAT="png"
52+
CONFIG_FIO_TESTS_GRAPH_DPI=150
53+
CONFIG_FIO_TESTS_GRAPH_THEME="default"
54+
55+
# Baseline/dev testing setup
56+
CONFIG_KDEVOPS_BASELINE_AND_DEV=y

defconfigs/fio-tests-perf

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Full performance testing configuration for fio-tests
2+
# Enables all test parameters for comprehensive performance analysis
3+
4+
# Workflow configuration
5+
CONFIG_WORKFLOWS=y
6+
CONFIG_WORKFLOWS_TESTS=y
7+
CONFIG_WORKFLOWS_LINUX_TESTS=y
8+
CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
9+
CONFIG_KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS=y
10+
11+
# Performance analysis mode
12+
CONFIG_FIO_TESTS_PERFORMANCE_ANALYSIS=y
13+
14+
# Enable all block sizes
15+
CONFIG_FIO_TESTS_BS_4K=y
16+
CONFIG_FIO_TESTS_BS_8K=y
17+
CONFIG_FIO_TESTS_BS_16K=y
18+
CONFIG_FIO_TESTS_BS_32K=y
19+
CONFIG_FIO_TESTS_BS_64K=y
20+
CONFIG_FIO_TESTS_BS_128K=y
21+
22+
# Enable all IO depths
23+
CONFIG_FIO_TESTS_IODEPTH_1=y
24+
CONFIG_FIO_TESTS_IODEPTH_4=y
25+
CONFIG_FIO_TESTS_IODEPTH_8=y
26+
CONFIG_FIO_TESTS_IODEPTH_16=y
27+
CONFIG_FIO_TESTS_IODEPTH_32=y
28+
CONFIG_FIO_TESTS_IODEPTH_64=y
29+
30+
# Enable all job counts
31+
CONFIG_FIO_TESTS_NUMJOBS_1=y
32+
CONFIG_FIO_TESTS_NUMJOBS_2=y
33+
CONFIG_FIO_TESTS_NUMJOBS_4=y
34+
CONFIG_FIO_TESTS_NUMJOBS_8=y
35+
CONFIG_FIO_TESTS_NUMJOBS_16=y
36+
37+
# Enable all test patterns
38+
CONFIG_FIO_TESTS_PATTERN_RAND_READ=y
39+
CONFIG_FIO_TESTS_PATTERN_RAND_WRITE=y
40+
CONFIG_FIO_TESTS_PATTERN_SEQ_READ=y
41+
CONFIG_FIO_TESTS_PATTERN_SEQ_WRITE=y
42+
CONFIG_FIO_TESTS_PATTERN_MIXED_75_25=y
43+
CONFIG_FIO_TESTS_PATTERN_MIXED_50_50=y
44+
45+
# Performance settings
46+
CONFIG_FIO_TESTS_IOENGINE="io_uring"
47+
CONFIG_FIO_TESTS_DIRECT=y
48+
CONFIG_FIO_TESTS_FSYNC_ON_CLOSE=y
49+
CONFIG_FIO_TESTS_RESULTS_DIR="/data/fio-tests"
50+
CONFIG_FIO_TESTS_LOG_AVG_MSEC=1000
51+
52+
# Graphing configuration
53+
CONFIG_FIO_TESTS_ENABLE_GRAPHING=y
54+
CONFIG_FIO_TESTS_GRAPH_FORMAT="png"
55+
CONFIG_FIO_TESTS_GRAPH_DPI=300
56+
57+
# Baseline/dev testing
58+
CONFIG_KDEVOPS_BASELINE_AND_DEV=y

0 commit comments

Comments
 (0)