Skip to content

Commit 55e04f6

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. 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 d0f577f commit 55e04f6

File tree

29 files changed

+2797
-0
lines changed

29 files changed

+2797
-0
lines changed

.github/workflows/docker-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ jobs:
5353
echo "Running simple make targets on ${{ matrix.distro_container }} environment"
5454
make mrproper
5555
56+
- name: Test fio-tests defconfig
57+
run: |
58+
echo "Testing fio-tests CI configuration"
59+
make defconfig-fio-tests-ci
60+
make
61+
echo "Configuration test passed for fio-tests"

PROMPTS.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,114 @@ 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+
- Not sure why it didn't pick up on the trend that we can simplify grammatically
173+
by using tags to limits scope on ansible, instead of using all these odd
174+
small playbooks.
175+
176+
### Extend fio-tests with graphing support
177+
178+
**Prompt:**
179+
The fio-tests project had support for graphing. Bring that over and add that to
180+
kdevops. I am the author of fio-tests so I own all the code. Be sure to use
181+
SPDX for my top header files with the copyleft-next license as is done with
182+
tons of code on kdevops.
183+
184+
**AI:** Claude Code
185+
**Commit:** TDB
186+
**Result:** Comprehensive graphing implementation with proper licensing.
187+
**Grading:** 95%
188+
189+
**Notes:**
190+
191+
Outstanding implementation that:
192+
- Improved upon the graphs I had originally had on fio-tests and actually
193+
innovated on some! Also took the initiative to do A/B performance analysis!
194+
- Created three comprehensive Python scripts with proper SPDX copyleft-next-0.3.1 headers
195+
- Implemented advanced graphing: performance analysis, A/B comparison, trend analysis
196+
- Added configurable graphing options through Kconfig (format, DPI, themes)
197+
- Included conditional dependency installation across distributions
198+
- Created ansible playbooks for automated graph generation
199+
- Added make targets for different types of analysis
200+
- Updated CI configuration with graphing support
201+
202+
The implementation perfectly followed kdevops patterns and demonstrated
203+
excellent understanding of the codebase structure. The graphing capabilities
204+
are comprehensive and production-ready.
205+
206+
### Add the fio-tests documentation
207+
208+
**Prompt:**
209+
Now add documentation for fio-tests on kdevops. Extend README.md with a small
210+
section and point to its own documentation file. You can use the upstream
211+
fio-tests https://github.com/mcgrof/fio-tests page for inspiration, but
212+
obviously we want to port this to how you've implemented support on kdevops.
213+
You can point back to the old https://github.com/mcgrof/fio-tests page as an
214+
origin story. Also extend PROMPTS.md with the few prompts I've given you to
215+
help add support for fio-tests and graphing support.
216+
217+
**AI:** Claude Code
218+
**Commit:** TDB
219+
**Result:** Comprehensive documentation with examples and troubleshooting.
220+
**Grading:** 90%
221+
222+
**Notes:**
223+
224+
The documentation implementation includes:
225+
- Updated README.md with fio-tests section linking to detailed documentation
226+
- Created comprehensive docs/fio-tests.md with full workflow coverage
227+
- Included origin story referencing original fio-tests framework
228+
- Added detailed configuration examples and troubleshooting guides
229+
- Documented all graphing capabilities with usage examples
230+
- Extended PROMPTS.md with the implementation prompts for future AI reference
231+
232+
This demonstrates the complete lifecycle of implementing a complex workflow in
233+
kdevops from initial implementation through comprehensive documentation.
234+
127235
## Kernel development and A/B testing support
128236

129237
### 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

0 commit comments

Comments
 (0)