Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P96532
fio yaml
Active
Public
Actions
Authored by
bking
on Mon, Sep 28, 7:59 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Project Tags
Data-Platform-SRE
Referenced Files
F105295368: fio yaml
Mon, Sep 28, 7:59 PM
2026-09-28 19:59:05 (UTC+0)
Subscribers
None
- name: Set up FIO
hosts: io-0.search.eqiad1.wikimedia.cloud
become: yes
gather_facts: yes
tasks:
- name: set full benchmark download dir
delegate_to: localhost
become: no
run_once: True
tags: ['always']
set_fact:
download_dir: "{{ benchmark_download_dir }}/{{ ansible_date_time.date }}"
- name: "set test directory name based on {{ test_variable }}"
delegate_to: localhost
become: no
run_once: True
tags: ['always']
file:
path: "{{ download_dir }}"
state: directory
- name: set test_filename based on date
delegate_to: localhost
become: no
run_once: True
tags: ['always']
set_fact:
test_filename: "{{ ansible_date_time.date }}-{{ test_variable }}.out"
- name: Ensure test dir exists
tags: ['always']
file:
path: "{{ fio_path }}"
state: directory
- name: Ensure test file exists
tags: ['always']
changed_when: False
file:
path: "{{ fio_path }}/{{ test_filename }}"
state: touch
- name: Ensure graphs dir exists
file:
path: "{{ fio_log_dir }}/graphs"
state: directory
mode: '0700'
owner: "{{ ansible_env.SUDO_USER }}"
# group: "{{ ansible_env.SUDO_USER }}"
- name: Ensure fio packages are installed
package:
name: "{{ item }}"
state: present
loop: "{{ io_pkgs }}"
# needed to run pip commands
- name: Ensure virtualenv is installed
package:
name: python3-virtualenv
state: present
# we'll conduct the tests using bench-fio
# https://github.com/louwrentius/fio-plot/tree/master
- name: install fio-plot via pip
become: no
pip:
name: fio-plot
state: present
virtualenv: '~/Fio'
environment:
http_proxy: 'http://webproxy:8080'
https_proxy: 'http://webproxy:8080'
- name: Render actions
become: no
tags: ['bench-fio', 'job', 'job_file', 'render']
block:
- name: render bench-fio job file according to specs
template:
src: bench-fio.ini.j2
dest: '~/{{ test_filename }}.ini'
- name: render fio-plot randwrite creation
set_fact:
fio_plot_randwrite_cmd: >-
{{ fio_log_dir }}/Fio/bin/fio-plot -i {{ fio_log_dir }}/benchmark/{{ test_filename }}/4k
--source "{{ ansible_hostname }}"
-T "{{ test_variable }}"
--bargraph2d-qd
--numjobs {{ numjobs | join(' ') }}
-d {{ iodepth | join(' ') }}
-r randwrite
--output-filename "{{ fio_log_dir }}/graphs/fio-graph-{{ ansible_hostname }}-randwrite-{{ test_filename }}.png"
- name: render fio-plot randread creation command
set_fact:
fio_plot_randread_cmd: >-
{{ fio_log_dir }}/Fio/bin/fio-plot -i {{ fio_log_dir }}/benchmark/{{ test_filename }}/4k
--source "{{ ansible_hostname }}"
-T "{{ test_variable }}"
--bargraph2d-qd
--numjobs {{ numjobs | join(' ') }}
-r randread
--output-filename "{{ fio_log_dir }}/graphs/fio-graph-{{ ansible_hostname }}-randread-{{ test_filename }}.png"
- name: execute using rendered data
tags: ['exec', 'run']
block:
- name: run bench-fio
shell:
cmd: "{{ fio_log_dir }}/Fio/bin/bench-fio {{ test_filename }}.ini"
args:
chdir: "{{ fio_log_dir }}"
async: 9600
poll: 10
# FIXME: this is only needed in my particular setup
- name: "Fix permissions in {{ ansible_env.SUDO_USER }}'s homedir"
file:
path: "{{ fio_log_dir }}"
owner: "{{ ansible_env.SUDO_USER }}"
# group: "{{ ansible_env.SUDO_USER }}"
recurse: True
# the benchmark dir is created via the "output" directive in the
# bench-fio.ini file
- name: download benchmark data to Ansible controller
tags: ['download']
ansible.posix.synchronize:
src: "{{ fio_log_dir }}/benchmark/{{ test_filename }}/4k/"
dest: "{{ download_dir }}"
mode: pull
existing_only: False
rsync_opts: ['--mkpath']
- name: Remove test files
tags: ['cleanup']
shell:
cmd: "rm -rfv {{ fio_path }}/*.out; rm -rfv {{ fio_log_dir }}/benchmark/*"
- name: render local fio-plot script
template:
src: '../templates/fio-plot-local.sh.j2'
dest: '{{ benchmark_download_dir }}/fio-plot-{{ test_filename }}.sh'
delegate_to: localhost
become: no
Event Timeline
bking
created this paste.
Mon, Sep 28, 7:59 PM
2026-09-28 19:59:05 (UTC+0)
Log In to Comment