steady-state: few fixes for steady state support
cover steady-state: few fixes for steady state support
Here are some fixes on top of what ChatGPT Codex generated. It shows why it gets only a grade of B. I've now tested this code on bare metal and confirm it works. Future work generated by AI won't be merged directly but more heavily tested and vetted. We essentially need to tell the bots to test new workflows too. It would have caught some of the minor issues like these.
The conversion of scripts/workflows/precondition/prefill-fio-jobs.sh was a bit more difficult so although the an AI did that conversion I did have to carefully vet it.
I did try to revert all the work and merge this patch on top as a clean single patch but that actually ended up being a mess. Oh well. The next patch will be a better example new workflow model of a patch we can tell generative AIs to use as a good example of a new workflow to base its work on.
This goes tested against bare metal. I just created the host file myself.
Luis Chamberlain (4):
steady-state: use extra sparse drives when on libvirt
steady-state: fix identation on Makefile
steady-state: remove extra menu
steady-state: quite a bit of fixes
.../roles/steady_state/defaults/main.yml | 37 +- playbooks/roles/steady_state/tasks/main.yaml | 314 +++++++++++++- .../roles/steady_state/templates/ss_bw.ini.j2 | 22 +- .../steady_state/templates/ss_iops.ini.j2 | 22 +- .../precondition/prefill-fio-jobs.sh | 390 ------------------ workflows/steady_state/Kconfig | 83 +++- workflows/steady_state/Makefile | 34 +- 7 files changed, 454 insertions(+), 448 deletions(-) delete mode 100755 scripts/workflows/precondition/prefill-fio-jobs.sh
Signature · 1 line
2.47.2
PATCH 1/4 steady-state: use extra sparse drives when on libvirt
preconditioning and steady-state support is now merged. But the ChatGPT codex implementation decided to use the same drives we'd use for /data/ today when using libvirt. Since steady state doesn't matter much for libvirt other than sanity tests to ensure it works, let's use the extra spare 3rd drive on libvirt instead.
--- workflows/steady_state/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
workflows/steady_state/Kconfig +3 -3
@@ -3,9 +3,9 @@ menu "Configure SSD steady state workflow" config SSD_STEADY_STATE_DEVICE string "Device to pre-condition" output yaml - default "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_NVME - default "/dev/disk/by-id/virtio-kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO - default "/dev/disk/by-id/ata-QEMU_HARDDISK_kdevops1" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_IDE + default "/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_kdevops2" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_NVME + default "/dev/disk/by-id/virtio-kdevops2" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_VIRTIO + default "/dev/disk/by-id/ata-QEMU_HARDDISK_kdevops2" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_IDE default "/dev/sdc" if LIBVIRT && LIBVIRT_EXTRA_STORAGE_DRIVE_SCSI default "/dev/nvme2n1" if TERRAFORM_AWS_INSTANCE_M5AD_4XLARGE default "/dev/nvme1n1" if TERRAFORM_GCE
Signature · 1 line
2.47.2
PATCH 2/4 steady-state: fix identation on Makefile
In reply to Luis ChamberlainChatGPT Codex generated this code, it gets a B rating as I only found one bug and this was it. I told it to borrow the stead-state code from my plot-sysbench code [0] and also take my fio-tests language and Kconfig logic from fio-tests [1].
And so I'll be folding in fio-tests to kdevops soon using kdevops as this is proving to be quite simple with ChatGPT codex. I can say then with more confidence that the architecture behind kdevops is making adding more workflows with things like ChatGPT codex super simple. We should be able to scale faster by now and recent developments / tools.
--- workflows/steady_state/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
workflows/steady_state/Makefile +5 -5
@@ -3,12 +3,12 @@ PHONY += steady-state steady-state-help-menu SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS := "kdevops_run_ssd_steady_state": True steady-state: -$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ --i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \ ---extra-vars '{ $(SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS) }' $(LIMIT_HOSTS) + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + -i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \ + --extra-vars '{ $(SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS) }' $(LIMIT_HOSTS) steady-state-help-menu: -@echo "steady-state - Prefill and run fio steady state" -@echo "" + @echo "steady-state - Prefill and run fio steady state" + @echo "" HELP_TARGETS += steady-state-help-menu
Signature · 1 line
2.47.2
PATCH 3/4 steady-state: remove extra menu
In reply to Luis ChamberlainNo need for an extra menu.
--- workflows/steady_state/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
workflows/steady_state/Kconfig +0 -4
@@ -1,5 +1,3 @@ -menu "Configure SSD steady state workflow" - config SSD_STEADY_STATE_DEVICE string "Device to pre-condition" output yaml
@@ -105,5 +103,3 @@ config SSD_STEADY_STATE_BW_SLOPE_DUR default "2h" help Duration the throughput slope criterion must hold. - -endmenu
Signature · 1 line
2.47.2
PATCH 4/4 steady-state: quite a bit of fixes
In reply to Luis ChamberlainThe original implementation forgot to just open code the pre-fill still as an ansible task. Claude AI did this for me, and with a bit more love I dealt with the odd ansible oddities found. Now that we have an open coded ansible version of the optimal prefill step with kdevops integration just remove the script.
Clarify the heuristics of the optimal prefill step on the SSD_STEADY_STATE_PREFILL_BLOCKSIZE documentation.
Let's also ensure we provide steady state output files, which is useful to visualize the steady state process for bw and iops.
--- .../roles/steady_state/defaults/main.yml | 37 +- playbooks/roles/steady_state/tasks/main.yaml | 314 +++++++++++++- .../roles/steady_state/templates/ss_bw.ini.j2 | 22 +- .../steady_state/templates/ss_iops.ini.j2 | 22 +- .../precondition/prefill-fio-jobs.sh | 390 ------------------ workflows/steady_state/Kconfig | 77 +++- workflows/steady_state/Makefile | 24 +- 7 files changed, 448 insertions(+), 438 deletions(-) delete mode 100755 scripts/workflows/precondition/prefill-fio-jobs.sh
playbooks/roles/steady_state/defaults/main.yml +23 -14
@@ -1,17 +1,26 @@ --- steady_state_data: "{{ data_path }}/steady_state" -steady_state_device: "/dev/nvme0n1" -precondition_blocksize: "128k" -precondition_iodepth: "32" -precondition_numjobs: "4" -precondition_prefill_loop: 2 -steady_state_runtime: "6h" -steady_state_iops_mean_limit: "20%" -steady_state_iops_mean_dur: "4h" -steady_state_iops_slope: "10%" -steady_state_iops_slope_dur: "4h" -steady_state_bw_mean_limit: "20%" -steady_state_bw_mean_dur: "2h" -steady_state_bw_slope: "10%" -steady_state_bw_slope_dur: "2h" +ssd_steady_state_device: "/dev/null" +ssd_steady_state_prefill_blocksize: "128k" +ssd_steady_state_iodepth: "32" +ssd_steady_state_numjobs: "4" +ssd_steady_state_prefill_loop: 2 +ssd_steady_state_runtime: "6h" +ssd_steady_state_iops_mean_limit: "20%" +ssd_steady_state_iops_mean_dur: "4h" +ssd_steady_state_iops_slope: "10%" +ssd_steady_state_iops_slope_dur: "4h" +ssd_steady_state_bw_mean_limit: "20%" +ssd_steady_state_bw_mean_dur: "2h" +ssd_steady_state_bw_slope: "10%" +ssd_steady_state_bw_slope_dur: "2h" kdevops_run_ssd_steady_state: False + +# Prefill configuration defaults +ssd_steady_state_prefill_verbose: False +ssd_steady_state_prefill_max_size: "" +ssd_steady_state_prefill_physical_bs: "" +ssd_steady_state_prefill_ioengine: "io_uring" +ssd_steady_state_prefill_direct: "1" +ssd_steady_state_prefill_alloc_size: "1048576" +ssd_steady_state_prefill_extra_args: ""
playbooks/roles/steady_state/tasks/main.yaml +301 -13
349 lines not on this page · raw message
playbooks/roles/steady_state/templates/ss_bw.ini.j2 +13 -9
@@ -9,23 +9,27 @@ buffered=0 norandommap refill_buffers -bs={{ precondition_blocksize }} -iodepth={{ precondition_iodepth }} -numjobs={{ precondition_numjobs }} -filename={{ steady_state_device }} +# We actually compute this at run time and override it on the command line. +# We keep the value you had only if you set SSD_STEADY_STATE_PREFILL_BLOCKSIZE +# to something not empty, your value: {{ ssd_steady_state_prefill_blocksize }} +# bs={{ ssd_steady_state_prefill_blocksize }} + +iodepth={{ ssd_steady_state_iodepth }} +numjobs={{ ssd_steady_state_numjobs }} +filename={{ ssd_steady_state_device }} exitall_on_error continue_on_error=none rw=randwrite -runtime={{ steady_state_runtime }} +runtime={{ ssd_steady_state_runtime }} [steady-state-mean-bw] -ss=bw:{{ steady_state_bw_mean_limit }} -ss_dur={{ steady_state_bw_mean_dur }} +ss=bw:{{ ssd_steady_state_bw_mean_limit }} +ss_dur={{ ssd_steady_state_bw_mean_dur }} [steady-state-slope-bw] new_group group_reporting -ss=bw_slope:{{ steady_state_bw_slope }} -ss_dur={{ steady_state_bw_slope_dur }} +ss=bw_slope:{{ ssd_steady_state_bw_slope }} +ss_dur={{ ssd_steady_state_bw_slope_dur }}
playbooks/roles/steady_state/templates/ss_iops.ini.j2 +13 -9
@@ -9,23 +9,27 @@ buffered=0 norandommap refill_buffers -bs={{ precondition_blocksize }} -iodepth={{ precondition_iodepth }} -numjobs={{ precondition_numjobs }} -filename={{ steady_state_device }} +# We actually compute this at run time and override it on the command line. +# We keep the value you had only if you set SSD_STEADY_STATE_PREFILL_BLOCKSIZE +# to something not empty, your value: {{ ssd_steady_state_prefill_blocksize }} +# bs={{ ssd_steady_state_prefill_blocksize }} + +iodepth={{ ssd_steady_state_iodepth }} +numjobs={{ ssd_steady_state_numjobs }} +filename={{ ssd_steady_state_device }} exitall_on_error continue_on_error=none rw=randwrite -runtime={{ steady_state_runtime }} +runtime={{ ssd_steady_state_runtime }} [steady-state-mean-iops] -ss=iops:{{ steady_state_iops_mean_limit }} -ss_dur={{ steady_state_iops_mean_dur }} +ss=iops:{{ ssd_steady_state_iops_mean_limit }} +ss_dur={{ ssd_steady_state_iops_mean_dur }} [steady-state-slope-iops] new_group group_reporting -ss=iops_slope:{{ steady_state_iops_slope }} -ss_dur={{ steady_state_iops_slope_dur }} +ss=iops_slope:{{ ssd_steady_state_iops_slope }} +ss_dur={{ ssd_steady_state_iops_slope_dur }}
scripts/workflows/precondition/prefill-fio-jobs.sh deleted +0 -390
390 lines not on this page · raw message
workflows/steady_state/Kconfig +75 -2
88 lines not on this page · raw message
workflows/steady_state/Makefile +23 -1
@@ -1,13 +1,35 @@ -PHONY += steady-state steady-state-help-menu +PHONY += steady-state +PHONY += steady-state-files +PHONY += steady-state-prefill +PHONY += steady-state-run +PHONY += steady-state-help-menu SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS := "kdevops_run_ssd_steady_state": True +steady-state-files: + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + -i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \ + --extra-vars=@./extra_vars.yaml --tags vars,setup $(LIMIT_HOSTS) + +steady-state-prefill: + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + -i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \ + --extra-vars=@./extra_vars.yaml --tags vars,prefill $(LIMIT_HOSTS) + +steady-state-run: + $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + -i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \ + --extra-vars=@./extra_vars.yaml --tags vars,steady_state $(LIMIT_HOSTS) + steady-state: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ -i $(KDEVOPS_HOSTFILE) playbooks/steady_state.yml \ --extra-vars '{ $(SSD_STEADY_STATE_DYNAMIC_RUNTIME_VARS) }' $(LIMIT_HOSTS) steady-state-help-menu: + @echo "steady-state-files - Install steady state template files only" + @echo "steady-state-prefill - Run prefill operations only" + @echo "steady-state-run - Run fio steady state tests only" @echo "steady-state - Prefill and run fio steady state" @echo ""
Signature · 1 line
2.47.2