Skip to content

Commit 12fa7a3

Browse files
committed
fio-tests: add runtime customization and performance defconfig
Add runtime duration choice configuration to fio-tests that can be controlled via the FIO_QUICK environment variable, following the bootlinux workflow pattern. 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 Also add defconfig-fio-tests-perf which enables 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 Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 55e04f6 commit 12fa7a3

File tree

6 files changed

+184
-31
lines changed

6 files changed

+184
-31
lines changed

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

playbooks/fio-tests-compare.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
- name: Generate comparison graphs
1919
shell: |
2020
python3 {{ topdir_path }}/playbooks/python/workflows/fio-tests/fio-compare.py \
21-
{{ topdir_path }}/workflows/fio-tests/results/{{ groups['baseline'][0] }} \
22-
{{ topdir_path }}/workflows/fio-tests/results/{{ groups['dev'][0] }} \
21+
{{ topdir_path }}/workflows/fio-tests/results/{{ groups['baseline'][0] }}/fio-tests-results-{{ groups['baseline'][0] }} \
22+
{{ topdir_path }}/workflows/fio-tests/results/{{ groups['dev'][0] }}/fio-tests-results-{{ groups['dev'][0] }} \
2323
--output-dir {{ topdir_path }}/workflows/fio-tests/results/graphs \
2424
--baseline-label "Baseline" \
2525
--dev-label "Development"

playbooks/roles/fio-tests/tasks/main.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,29 @@
3737
([{'name': 'mixed_50_50', 'rw': 'randrw', 'rwmixread': 50}] if fio_tests_pattern_mixed_50_50 else [])
3838
}}
3939
40+
- name: Calculate total test combinations and timeout
41+
set_fact:
42+
fio_tests_total_combinations: "{{ fio_tests_block_sizes | length * fio_tests_io_depths | length * fio_tests_num_jobs | length * fio_tests_patterns | length }}"
43+
fio_test_time_per_job: "{{ (fio_tests_runtime | int) + (fio_tests_ramp_time | int) }}"
44+
45+
- name: Calculate async timeout with safety margin
46+
set_fact:
47+
# Each test runs twice (JSON + normal output), add 60s per test for overhead, then add 30% safety margin
48+
fio_tests_async_timeout: "{{ ((fio_tests_total_combinations | int * fio_test_time_per_job | int * 2) + (fio_tests_total_combinations | int * 60) * 1.3) | int }}"
49+
50+
- name: Display test configuration
51+
debug:
52+
msg: |
53+
FIO Test Configuration:
54+
- Total test combinations: {{ fio_tests_total_combinations }}
55+
- Runtime per test: {{ fio_tests_runtime }}s
56+
- Ramp time per test: {{ fio_tests_ramp_time }}s
57+
- Estimated total time: {{ (fio_tests_total_combinations | int * fio_test_time_per_job | int * 2 / 60) | round(1) }} minutes
58+
- Async timeout: {{ (fio_tests_async_timeout | int / 60) | round(1) }} minutes
59+
{% if fio_tests_device == '/dev/null' %}
60+
- Note: Using /dev/null - fsync_on_close and direct IO disabled automatically
61+
{% endif %}
62+
4063
- name: Install fio and dependencies
4164
include_tasks: install-deps/main.yml
4265

@@ -88,7 +111,7 @@
88111
--output-format=normal
89112
done
90113
become: yes
91-
async: 7200 # 2 hours timeout
114+
async: "{{ fio_tests_async_timeout | default(7200) }}"
92115
poll: 30
93116

94117
- name: Remove old fio-tests results archive if it exists
@@ -100,10 +123,12 @@
100123

101124
- name: Archive fio-tests results directory on remote host
102125
become: yes
103-
command: >
104-
tar czf {{ fio_tests_results_dir }}/fio-tests-results-{{ inventory_hostname }}.tar.gz -C {{ fio_tests_results_dir }} .
105-
args:
106-
creates: "{{ fio_tests_results_dir }}/fio-tests-results-{{ inventory_hostname }}.tar.gz"
126+
shell: |
127+
cd {{ fio_tests_results_dir }}
128+
tar czf /tmp/fio-tests-results-{{ inventory_hostname }}.tar.gz \
129+
--exclude='*.tar.gz' \
130+
results_*.json results_*.txt *.log jobs/ 2>/dev/null || true
131+
mv /tmp/fio-tests-results-{{ inventory_hostname }}.tar.gz {{ fio_tests_results_dir }}/ || true
107132
tags: [ 'results' ]
108133

109134
- name: Remove previously fetched fio-tests results archive if it exists

playbooks/roles/fio-tests/templates/fio-job.ini.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ direct=0
55
{% else %}
66
direct={{ fio_tests_direct | int }}
77
{% endif %}
8+
{% if fio_tests_device == '/dev/null' %}
9+
fsync_on_close=0
10+
{% else %}
811
fsync_on_close={{ fio_tests_fsync_on_close | int }}
12+
{% endif %}
913
group_reporting=1
1014
time_based=1
1115
runtime={{ fio_tests_runtime }}

workflows/fio-tests/Kconfig

Lines changed: 86 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,59 @@ config FIO_TESTS_DEVICE
5959
The block device to use for fio testing. For CI/testing
6060
purposes, /dev/null can be used as a simple target.
6161

62+
config FIO_TESTS_QUICK_SET_BY_CLI
63+
bool
64+
output yaml
65+
default $(shell, scripts/check-cli-set-var.sh FIO_QUICK)
66+
67+
choice
68+
prompt "FIO test runtime duration"
69+
default FIO_TESTS_RUNTIME_DEFAULT if !FIO_TESTS_QUICK_SET_BY_CLI
70+
default FIO_TESTS_RUNTIME_QUICK if FIO_TESTS_QUICK_SET_BY_CLI
71+
72+
config FIO_TESTS_RUNTIME_DEFAULT
73+
bool "Default runtime (60 seconds)"
74+
help
75+
Use default runtime of 60 seconds per job for comprehensive
76+
performance testing.
77+
78+
config FIO_TESTS_RUNTIME_QUICK
79+
bool "Quick runtime (10 seconds)"
80+
help
81+
Use quick runtime of 10 seconds per job for rapid testing
82+
or CI environments.
83+
84+
config FIO_TESTS_RUNTIME_CUSTOM_HIGH
85+
bool "Custom high runtime (300 seconds)"
86+
help
87+
Use extended runtime of 300 seconds per job for thorough
88+
long-duration testing.
89+
90+
config FIO_TESTS_RUNTIME_CUSTOM_LOW
91+
bool "Custom low runtime (5 seconds)"
92+
help
93+
Use minimal runtime of 5 seconds per job for very quick
94+
smoke testing.
95+
96+
endchoice
97+
6298
config FIO_TESTS_RUNTIME
6399
string "Test runtime per job"
64100
output yaml
65-
default "60"
101+
default "60" if FIO_TESTS_RUNTIME_DEFAULT
102+
default "10" if FIO_TESTS_RUNTIME_QUICK
103+
default "300" if FIO_TESTS_RUNTIME_CUSTOM_HIGH
104+
default "5" if FIO_TESTS_RUNTIME_CUSTOM_LOW
66105
help
67-
Runtime in seconds for each fio job. Default is 60 seconds
68-
for reasonable test duration while allowing comprehensive
69-
testing.
106+
Runtime in seconds for each fio job.
70107

71108
config FIO_TESTS_RAMP_TIME
72109
string "Ramp time before measurements"
73110
output yaml
74-
default "10"
111+
default "10" if FIO_TESTS_RUNTIME_DEFAULT
112+
default "2" if FIO_TESTS_RUNTIME_QUICK
113+
default "30" if FIO_TESTS_RUNTIME_CUSTOM_HIGH
114+
default "1" if FIO_TESTS_RUNTIME_CUSTOM_LOW
75115
help
76116
Time in seconds to ramp up before starting measurements.
77117
This allows the workload to stabilize before collecting
@@ -90,35 +130,40 @@ config FIO_TESTS_BS_4K
90130
config FIO_TESTS_BS_8K
91131
bool "8K block size tests"
92132
output yaml
93-
default y
133+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
134+
default n if FIO_TESTS_QUICK_SET_BY_CLI
94135
help
95136
Enable 8K block size testing.
96137

97138
config FIO_TESTS_BS_16K
98139
bool "16K block size tests"
99140
output yaml
100-
default y
141+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
142+
default n if FIO_TESTS_QUICK_SET_BY_CLI
101143
help
102144
Enable 16K block size testing.
103145

104146
config FIO_TESTS_BS_32K
105147
bool "32K block size tests"
106148
output yaml
107-
default n
149+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
150+
default n if FIO_TESTS_QUICK_SET_BY_CLI
108151
help
109152
Enable 32K block size testing.
110153

111154
config FIO_TESTS_BS_64K
112155
bool "64K block size tests"
113156
output yaml
114-
default n
157+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
158+
default n if FIO_TESTS_QUICK_SET_BY_CLI
115159
help
116160
Enable 64K block size testing.
117161

118162
config FIO_TESTS_BS_128K
119163
bool "128K block size tests"
120164
output yaml
121-
default n
165+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
166+
default n if FIO_TESTS_QUICK_SET_BY_CLI
122167
help
123168
Enable 128K block size testing.
124169

@@ -136,35 +181,40 @@ config FIO_TESTS_IODEPTH_1
136181
config FIO_TESTS_IODEPTH_4
137182
bool "IO depth 4"
138183
output yaml
139-
default y
184+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
185+
default n if FIO_TESTS_QUICK_SET_BY_CLI
140186
help
141187
Test with IO depth of 4.
142188

143189
config FIO_TESTS_IODEPTH_8
144190
bool "IO depth 8"
145191
output yaml
146-
default y
192+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
193+
default n if FIO_TESTS_QUICK_SET_BY_CLI
147194
help
148195
Test with IO depth of 8.
149196

150197
config FIO_TESTS_IODEPTH_16
151198
bool "IO depth 16"
152199
output yaml
153-
default y
200+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
201+
default n if FIO_TESTS_QUICK_SET_BY_CLI
154202
help
155203
Test with IO depth of 16.
156204

157205
config FIO_TESTS_IODEPTH_32
158206
bool "IO depth 32"
159207
output yaml
160-
default n
208+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
209+
default n if FIO_TESTS_QUICK_SET_BY_CLI
161210
help
162211
Test with IO depth of 32.
163212

164213
config FIO_TESTS_IODEPTH_64
165214
bool "IO depth 64"
166215
output yaml
167-
default n
216+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
217+
default n if FIO_TESTS_QUICK_SET_BY_CLI
168218
help
169219
Test with IO depth of 64.
170220

@@ -182,28 +232,32 @@ config FIO_TESTS_NUMJOBS_1
182232
config FIO_TESTS_NUMJOBS_2
183233
bool "2 jobs"
184234
output yaml
185-
default y
235+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
236+
default n if FIO_TESTS_QUICK_SET_BY_CLI
186237
help
187238
Test with 2 concurrent fio jobs.
188239

189240
config FIO_TESTS_NUMJOBS_4
190241
bool "4 jobs"
191242
output yaml
192-
default y
243+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
244+
default n if FIO_TESTS_QUICK_SET_BY_CLI
193245
help
194246
Test with 4 concurrent fio jobs.
195247

196248
config FIO_TESTS_NUMJOBS_8
197249
bool "8 jobs"
198250
output yaml
199-
default n
251+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
252+
default n if FIO_TESTS_QUICK_SET_BY_CLI
200253
help
201254
Test with 8 concurrent fio jobs.
202255

203256
config FIO_TESTS_NUMJOBS_16
204257
bool "16 jobs"
205258
output yaml
206-
default n
259+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
260+
default n if FIO_TESTS_QUICK_SET_BY_CLI
207261
help
208262
Test with 16 concurrent fio jobs.
209263

@@ -221,35 +275,40 @@ config FIO_TESTS_PATTERN_RAND_READ
221275
config FIO_TESTS_PATTERN_RAND_WRITE
222276
bool "Random write"
223277
output yaml
224-
default y
278+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
279+
default n if FIO_TESTS_QUICK_SET_BY_CLI
225280
help
226281
Enable random write workload testing.
227282

228283
config FIO_TESTS_PATTERN_SEQ_READ
229284
bool "Sequential read"
230285
output yaml
231-
default y
286+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
287+
default n if FIO_TESTS_QUICK_SET_BY_CLI
232288
help
233289
Enable sequential read workload testing.
234290

235291
config FIO_TESTS_PATTERN_SEQ_WRITE
236292
bool "Sequential write"
237293
output yaml
238-
default y
294+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
295+
default n if FIO_TESTS_QUICK_SET_BY_CLI
239296
help
240297
Enable sequential write workload testing.
241298

242299
config FIO_TESTS_PATTERN_MIXED_75_25
243300
bool "Mixed 75% read / 25% write"
244301
output yaml
245-
default n
302+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
303+
default n if FIO_TESTS_QUICK_SET_BY_CLI
246304
help
247305
Enable mixed workload with 75% reads and 25% writes.
248306

249307
config FIO_TESTS_PATTERN_MIXED_50_50
250308
bool "Mixed 50% read / 50% write"
251309
output yaml
252-
default n
310+
default y if !FIO_TESTS_QUICK_SET_BY_CLI
311+
default n if FIO_TESTS_QUICK_SET_BY_CLI
253312
help
254313
Enable mixed workload with 50% reads and 50% writes.
255314

@@ -284,6 +343,9 @@ config FIO_TESTS_FSYNC_ON_CLOSE
284343
Call fsync() before closing files to ensure data is
285344
written to storage.
286345

346+
Note: This is automatically disabled when using /dev/null
347+
as the test device since /dev/null doesn't support fsync.
348+
287349
config FIO_TESTS_RESULTS_DIR
288350
string "Results directory"
289351
output yaml

0 commit comments

Comments
 (0)