Skip to content

Commit 1a7ab5e

Browse files
committed
Fix steady state workflow Kconfig
1 parent 9af865b commit 1a7ab5e

File tree

9 files changed

+302
-3
lines changed

9 files changed

+302
-3
lines changed

kconfigs/workflows/Kconfig

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ choice
2626
config WORKFLOW_LINUX_DISTRO
2727
bool "Distro kernel"
2828
help
29-
If you are targetting a workflow to run on a distribution kernel
29+
If you are targeting a workflow to run on a distribution kernel
3030
enable this.
3131

3232
config WORKFLOW_LINUX_CUSTOM
3333
bool "Upstream Linux or custom kernel"
3434
select BOOTLINUX
3535
help
36-
If you are targetting a workflow to run on a vanilla upstream
36+
If you are targeting a workflow to run on a vanilla upstream
3737
linux, linux-stable, linux-next, or a custom kernel you want to
3838
build and install enable this.
3939

@@ -80,7 +80,7 @@ config WORKFLOWS_LINUX_TESTS
8080
if WORKFLOWS_LINUX_TESTS
8181

8282
config WORKFLOWS_DEDICATED_WORKFLOW
83-
bool "Are you only targetting one subsystem test?"
83+
bool "Are you only targeting one subsystem test?"
8484
default y
8585
help
8686
Enable this to if you are only wanting to test one main Linux
@@ -390,6 +390,23 @@ source "workflows/sysbench/Kconfig"
390390
endmenu
391391
endif # KDEVOPS_WORKFLOW_ENABLE_SYSBENCH
392392

393+
config KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
394+
bool "Attain SSD steady state prior to tests"
395+
output yaml
396+
help
397+
SNIA guidelines recommend purging and pre-conditioning storage
398+
devices before collecting performance data. This optional
399+
workflow mirrors fio-tests' generic steady state provisioning:
400+
it pre-fills the device and runs fio steady state checks for
401+
both IOPS and throughput. Enable this to ensure your target
402+
drive has reached steady state prior to running other workflows.
403+
404+
if KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
405+
menu "Configure SSD steady state workflow"
406+
source "workflows/steady_state/Kconfig"
407+
endmenu
408+
endif # KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
409+
393410
config KDEVOPS_WORKFLOW_GIT_CLONES_KDEVOPS_GIT
394411
bool
395412
default y if KDEVOPS_WORKFLOW_ENABLE_FSTESTS || KDEVOPS_WORKFLOW_ENABLE_BLKTESTS
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
steady_state_data: "{{ data_path }}/steady_state"
3+
steady_state_device: "/dev/nvme0n1"
4+
precondition_blocksize: "128k"
5+
precondition_iodepth: "32"
6+
precondition_numjobs: "4"
7+
precondition_prefill_loop: 2
8+
steady_state_runtime: "6h"
9+
steady_state_iops_mean_limit: "20%"
10+
steady_state_iops_mean_dur: "4h"
11+
steady_state_iops_slope: "10%"
12+
steady_state_iops_slope_dur: "4h"
13+
steady_state_bw_mean_limit: "20%"
14+
steady_state_bw_mean_dur: "2h"
15+
steady_state_bw_slope: "10%"
16+
steady_state_bw_slope_dur: "2h"
17+
kdevops_run_ssd_steady_state: False
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
- name: Import optional extra_args file
3+
ansible.builtin.include_vars:
4+
file: "{{ item }}"
5+
with_first_found:
6+
- files:
7+
- "../extra_vars.yml"
8+
- "../extra_vars.yaml"
9+
- "../extra_vars.json"
10+
skip: true
11+
failed_when: false
12+
tags: vars
13+
14+
- name: Ensure steady state directory exists
15+
become: yes
16+
become_method: sudo
17+
ansible.builtin.file:
18+
path: "{{ steady_state_data }}"
19+
state: directory
20+
tags: ['setup']
21+
22+
- name: Generate fio steady state configs
23+
become: yes
24+
become_method: sudo
25+
template:
26+
src: "{{ item }}.j2"
27+
dest: "{{ steady_state_data }}/{{ item }}"
28+
mode: '0644'
29+
loop:
30+
- ss_iops.ini
31+
- ss_bw.ini
32+
tags: ['setup']
33+
34+
- name: Run prefill helper and execute fio commands
35+
become: yes
36+
become_method: sudo
37+
shell: |
38+
{{ topdir_path }}/scripts/workflows/precondition/prefill-fio-jobs.sh \
39+
--target {{ steady_state_device }} \
40+
--blocksize {{ precondition_blocksize }} \
41+
--jobs {{ precondition_numjobs }} \
42+
--verbose > {{ steady_state_data }}/prefill.cmd
43+
grep '^fio' {{ steady_state_data }}/prefill.cmd | bash
44+
args:
45+
executable: /bin/bash
46+
when: kdevops_run_ssd_steady_state|bool
47+
tags: ['prefill']
48+
49+
- name: Run fio steady state for iops
50+
become: yes
51+
become_method: sudo
52+
command: fio {{ steady_state_data }}/ss_iops.ini
53+
when: kdevops_run_ssd_steady_state|bool
54+
tags: ['steady_state']
55+
56+
- name: Run fio steady state for bw
57+
become: yes
58+
become_method: sudo
59+
command: fio {{ steady_state_data }}/ss_bw.ini
60+
when: kdevops_run_ssd_steady_state|bool
61+
tags: ['steady_state']
62+
63+
- name: Copy steady state results to controller
64+
ansible.posix.synchronize:
65+
src: "{{ steady_state_data }}/"
66+
dest: "{{ topdir_path }}/workflows/steady_state/results/{{ inventory_hostname }}/"
67+
mode: pull
68+
recursive: true
69+
rsync_opts:
70+
- "--ignore-existing"
71+
delegate_to: localhost
72+
when: kdevops_run_ssd_steady_state|bool
73+
tags: ['results']
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[global]
2+
name=Workload dependent steady state bw random pre-conditioning
3+
threads=1
4+
group_reporting=1
5+
time_based
6+
ioengine=io_uring
7+
direct=1
8+
buffered=0
9+
norandommap
10+
refill_buffers
11+
12+
bs={{ precondition_blocksize }}
13+
iodepth={{ precondition_iodepth }}
14+
numjobs={{ precondition_numjobs }}
15+
filename={{ steady_state_device }}
16+
17+
exitall_on_error
18+
continue_on_error=none
19+
20+
rw=randwrite
21+
22+
runtime={{ steady_state_runtime }}
23+
[steady-state-mean-bw]
24+
ss=bw:{{ steady_state_bw_mean_limit }}
25+
ss_dur={{ steady_state_bw_mean_dur }}
26+
27+
[steady-state-slope-bw]
28+
new_group
29+
group_reporting
30+
ss=bw_slope:{{ steady_state_bw_slope }}
31+
ss_dur={{ steady_state_bw_slope_dur }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[global]
2+
name=Workload dependent steady state iops random pre-conditioning
3+
threads=1
4+
group_reporting=1
5+
time_based
6+
ioengine=io_uring
7+
direct=1
8+
buffered=0
9+
norandommap
10+
refill_buffers
11+
12+
bs={{ precondition_blocksize }}
13+
iodepth={{ precondition_iodepth }}
14+
numjobs={{ precondition_numjobs }}
15+
filename={{ steady_state_device }}
16+
17+
exitall_on_error
18+
continue_on_error=none
19+
20+
rw=randwrite
21+
22+
runtime={{ steady_state_runtime }}
23+
[steady-state-mean-iops]
24+
ss=iops:{{ steady_state_iops_mean_limit }}
25+
ss_dur={{ steady_state_iops_mean_dur }}
26+
27+
[steady-state-slope-iops]
28+
new_group
29+
group_reporting
30+
ss=iops_slope:{{ steady_state_iops_slope }}
31+
ss_dur={{ steady_state_iops_slope_dur }}

playbooks/steady_state.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
- hosts: all
3+
roles:
4+
- role: steady_state

workflows/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_SYSBENCH))
5454
include workflows/sysbench/Makefile
5555
endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_SYSBENCH == y
5656

57+
ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE))
58+
include workflows/steady_state/Makefile
59+
endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE == y
60+
5761
ANSIBLE_EXTRA_ARGS += $(WORKFLOW_ARGS)
5862
ANSIBLE_EXTRA_ARGS_SEPARATED += $(WORKFLOW_ARGS_SEPARATED)
5963
ANSIBLE_EXTRA_ARGS_DIRECT += $(WORKFLOW_ARGS_DIRECT)

workflows/steady_state/Kconfig

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
menu "Configure SSD steady state workflow"
2+
3+
config SSD_STEADY_STATE_DEVICE
4+
string "Device to pre-condition"
5+
output yaml
6+
default "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_NVME
7+
default "/dev/disk/by-id/virtio-kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO
8+
default "/dev/disk/by-id/ata-QEMU_HARDDISK_kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_IDE
9+
default "/dev/nvme2n1" if TERRAFORM_AWS_INSTANCE_M5AD_4XLARGE
10+
default "/dev/nvme1n1" if TERRAFORM_GCE
11+
default "/dev/sdd" if TERRAFORM_AZURE
12+
default TERRAFORM_OCI_SPARSE_VOLUME_DEVICE_FILE_NAME if TERRAFORM_OCI
13+
help
14+
Block device to operate on for steady state.
15+
16+
config SSD_STEADY_STATE_PREFILL_BLOCKSIZE
17+
string "Prefill blocksize"
18+
output yaml
19+
default "128k"
20+
help
21+
Block size used during the prefill step before steady
22+
state verification.
23+
24+
config SSD_STEADY_STATE_IODEPTH
25+
string "Prefill iodepth"
26+
output yaml
27+
default "32"
28+
help
29+
Queue depth used for the prefill workload.
30+
31+
config SSD_STEADY_STATE_NUMJOBS
32+
string "Prefill number jobs"
33+
output yaml
34+
default "4"
35+
help
36+
Number of fio jobs to spawn for the prefill step.
37+
38+
config SSD_STEADY_STATE_PREFILL_LOOP
39+
int "Prefill loop count"
40+
output yaml
41+
default 2
42+
help
43+
How many iterations of the prefill helper to run.
44+
45+
config SSD_STEADY_STATE_RUNTIME
46+
string "Steady state runtime"
47+
output yaml
48+
default "6h"
49+
help
50+
Maximum runtime allowed for each steady state check.
51+
52+
config SSD_STEADY_STATE_IOPS_MEAN_LIMIT
53+
string "IOPS steady state mean limit"
54+
output yaml
55+
default "20%"
56+
help
57+
fio ss=iops value defining the IOPS mean limit criteria.
58+
59+
config SSD_STEADY_STATE_IOPS_MEAN_DUR
60+
string "IOPS steady state mean duration"
61+
output yaml
62+
default "4h"
63+
help
64+
Duration the IOPS mean limit must be sustained.
65+
66+
config SSD_STEADY_STATE_IOPS_SLOPE
67+
string "IOPS steady state slope"
68+
output yaml
69+
default "10%"
70+
help
71+
fio ss=iops_slope percentage for slope detection.
72+
73+
config SSD_STEADY_STATE_IOPS_SLOPE_DUR
74+
string "IOPS steady state slope duration"
75+
output yaml
76+
default "4h"
77+
help
78+
Duration the IOPS slope criterion must hold.
79+
80+
config SSD_STEADY_STATE_BW_MEAN_LIMIT
81+
string "BW steady state mean limit"
82+
output yaml
83+
default "20%"
84+
help
85+
fio ss=bw value defining the throughput mean limit.
86+
87+
config SSD_STEADY_STATE_BW_MEAN_DUR
88+
string "BW steady state mean duration"
89+
output yaml
90+
default "2h"
91+
help
92+
Duration the throughput mean limit must be sustained.
93+
94+
config SSD_STEADY_STATE_BW_SLOPE
95+
string "BW steady state slope"
96+
output yaml
97+
default "10%"
98+
help
99+
fio ss=bw_slope percentage for slope detection.
100+
101+
config SSD_STEADY_STATE_BW_SLOPE_DUR
102+
string "BW steady state slope duration"
103+
output yaml
104+
default "2h"
105+
help
106+
Duration the throughput slope criterion must hold.
107+
108+
endmenu

workflows/steady_state/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
PHONY += steady-state steady-state-help-menu
2+
3+
SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS := "kdevops_run_ssd_steady_state": True
4+
5+
steady-state:
6+
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
7+
-i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \
8+
--extra-vars '{ $(SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS) }' $(LIMIT_HOSTS)
9+
10+
steady-state-help-menu:
11+
@echo "steady-state - Prefill and run fio steady state"
12+
@echo ""
13+
14+
HELP_TARGETS += steady-state-help-menu

0 commit comments

Comments
 (0)