Skip to content

Commit 16658a9

Browse files
committed
Refine steady state workflow defaults and docs
1 parent 9af865b commit 16658a9

File tree

9 files changed

+313
-3
lines changed

9 files changed

+313
-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
395+
output yaml
396+
default n
397+
help
398+
Steady state is a state where performance is considered stable.
399+
SNIA guidelines recommend purging and pre-conditioning a device
400+
before collecting performance data. Enable this workflow if you
401+
want to run the fio steady state scripts prior to other workflows
402+
to verify the target drive has reached steady state.
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: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
config KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
2+
bool "Enable SSD steady state workflow"
3+
output yaml
4+
default n
5+
help
6+
Enable this workflow to pre-condition a block device and
7+
verify steady state performance using fio before running
8+
other workflows.
9+
10+
if KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
11+
menu "Configure SSD steady state workflow"
12+
13+
config SSD_STEADY_STATE_DEVICE
14+
string "Device to pre-condition"
15+
output yaml
16+
default "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_NVME
17+
default "/dev/disk/by-id/virtio-kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO
18+
default "/dev/disk/by-id/ata-QEMU_HARDDISK_kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_IDE
19+
default "/dev/nvme2n1" if TERRAFORM_AWS_INSTANCE_M5AD_4XLARGE
20+
default "/dev/nvme1n1" if TERRAFORM_GCE
21+
default "/dev/sdd" if TERRAFORM_AZURE
22+
default TERRAFORM_OCI_SPARSE_VOLUME_DEVICE_FILE_NAME if TERRAFORM_OCI
23+
help
24+
Block device to operate on for steady state.
25+
26+
config SSD_STEADY_STATE_PREFILL_BLOCKSIZE
27+
string "Prefill blocksize"
28+
output yaml
29+
default "128k"
30+
help
31+
Block size used during the prefill step before steady
32+
state verification.
33+
34+
config SSD_STEADY_STATE_IODEPTH
35+
string "Prefill iodepth"
36+
output yaml
37+
default "32"
38+
help
39+
Queue depth used for the prefill workload.
40+
41+
config SSD_STEADY_STATE_NUMJOBS
42+
string "Prefill number jobs"
43+
output yaml
44+
default "4"
45+
help
46+
Number of fio jobs to spawn for the prefill step.
47+
48+
config SSD_STEADY_STATE_PREFILL_LOOP
49+
int "Prefill loop count"
50+
output yaml
51+
default 2
52+
help
53+
How many iterations of the prefill helper to run.
54+
55+
config SSD_STEADY_STATE_RUNTIME
56+
string "Steady state runtime"
57+
output yaml
58+
default "6h"
59+
help
60+
Maximum runtime allowed for each steady state check.
61+
62+
config SSD_STEADY_STATE_IOPS_MEAN_LIMIT
63+
string "IOPS steady state mean limit"
64+
output yaml
65+
default "20%"
66+
help
67+
fio ss=iops value defining the IOPS mean limit criteria.
68+
69+
config SSD_STEADY_STATE_IOPS_MEAN_DUR
70+
string "IOPS steady state mean duration"
71+
output yaml
72+
default "4h"
73+
help
74+
Duration the IOPS mean limit must be sustained.
75+
76+
config SSD_STEADY_STATE_IOPS_SLOPE
77+
string "IOPS steady state slope"
78+
output yaml
79+
default "10%"
80+
help
81+
fio ss=iops_slope percentage for slope detection.
82+
83+
config SSD_STEADY_STATE_IOPS_SLOPE_DUR
84+
string "IOPS steady state slope duration"
85+
output yaml
86+
default "4h"
87+
help
88+
Duration the IOPS slope criterion must hold.
89+
90+
config SSD_STEADY_STATE_BW_MEAN_LIMIT
91+
string "BW steady state mean limit"
92+
output yaml
93+
default "20%"
94+
help
95+
fio ss=bw value defining the throughput mean limit.
96+
97+
config SSD_STEADY_STATE_BW_MEAN_DUR
98+
string "BW steady state mean duration"
99+
output yaml
100+
default "2h"
101+
help
102+
Duration the throughput mean limit must be sustained.
103+
104+
config SSD_STEADY_STATE_BW_SLOPE
105+
string "BW steady state slope"
106+
output yaml
107+
default "10%"
108+
help
109+
fio ss=bw_slope percentage for slope detection.
110+
111+
config SSD_STEADY_STATE_BW_SLOPE_DUR
112+
string "BW steady state slope duration"
113+
output yaml
114+
default "2h"
115+
help
116+
Duration the throughput slope criterion must hold.
117+
118+
endmenu
119+
endif

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)