https://github.com/stackhpc/ansible-collection-fio-perfkit
https://github.com/stackhpc/ansible-collection-fio-perfkit
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/stackhpc/ansible-collection-fio-perfkit
- Owner: stackhpc
- License: apache-2.0
- Created: 2023-01-23T17:59:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T08:14:58.000Z (over 2 years ago)
- Last Synced: 2024-04-14T22:50:15.502Z (about 2 years ago)
- Language: Jinja
- Size: 49.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-collection-fio-perfkit
An ansible collection for benchmarking network filesystem aggregate performance using `fio`, the [flexible IO](https://fio.readthedocs.io/en/latest/) tester.
### Installation
```
python3 -m venv venv
source venv/bin/activate
pip install ansible>=9.0
ansible-galaxy collection install git+https://github.com/stackhpc/ansible-collection-fio-perfkit.git
```
### Usage
#### Ansible inventory
Create a simple Ansible inventory, specifying a single `control` host, and as many network filesystem `fs_client` hosts as required.
The control `host` may be `localhost`, but the control host must be able to connect to port 8765 on all `fs_client` hosts.
Equally, the control host may be one of the filesystem clients, but output plots will be generated on the control host and must be retrieved.
For io500 tests, a single `io500` group of hosts participating in the io500 test should be created. The first host
listed in the group wil coordinate the io500 MPI jobs.
```
[control]
localhost ansible_connection=local # Must be able to connect to port 8765 on all clients
[fs_clients]
fs-client[01-30]
[device_clients]
osd[01-30]
[io500]
fs-client[01-30]
```
#### Ansible playbook
An example Ansible playbook to use with `ansible-collection-fio-perfkit`:
```yaml
---
- name: Run device tests
hosts: device_clients
gather_facts: true
tasks:
- name: Test conncurrent IO to all devices on a host
ansible.builtin.import_role:
name: stackhpc.fio_perfkit.fio_perfkit_single_host
tags:
- single-host
vars:
fio_perfkit_single_host_config:
- devices:
- /dev/vdb
- /dev/vdc
max_numjobs: 4
bs: 1M
rw: write
runtime: 2
filesize: 2M
- name: Test conncurrent IO from multiple processes to a single device on a host
ansible.builtin.import_role:
name: stackhpc.fio_perfkit.fio_perfkit_single_device
tags:
- single-device
vars:
fio_perfkit_single_device_config:
- device: /dev/vdb
max_numjobs: 4
bs: 1M
rw: write
runtime: 2
filesize: 2M
- name: Run filesystem tests
hosts: fs_clients,control
gather_facts: true
tasks:
- name: Test a mix of read/write IO to a shared filesystem from many clients
ansible.builtin.import_role:
name: stackhpc.fio_perfkit.fio_perfkit_fs_mixed_io
tags:
- fs-mixed-io
vars:
fio_perfkit_fs_mixed_io_config:
# Test the product of fio_bs_list, fio_read_mix and fio_random_mix
# Ranges for fio_read_mix and fio_random_mix are calculated
fio_directory: /mnt/scratch # Target directory for fio tests
fio_runtime: 5 # fio runtime
fio_numjobs: 2 # fio numjobs
fio_size: 1M # fio filesize
fio_nrfiles: 2 # fio nrfiles
fio_bs_list: # List of blocksizes to test
- 1M
fio_read_mix:
start: 0
end: 100
step: 50
fio_random_mix:
start: 0
end: 100
step: 50
- name: Test the aggregate performance of a shared filesystem from many clients
ansible.builtin.import_role:
name: stackhpc.fio_perfkit.fio_perfkit_fs_aggregate_io
tags:
- fs-aggregate-io
vars:
fio_perfkit_fs_aggregate_io_config:
# Test the product of fio_bs_list and fio_rw_list
fio_directory: /mnt/scratch # Target directory for fio tests
fio_runtime: 5 # fio runtime
fio_numjobs: 2 # fio numjobs
fio_size: 1M # fio filesize
fio_nrfiles: 2 # fio nrfiles
fio_bs_list: # List of blocksizes to test
- 1M
- 32k
fio_rw_list: # List of rw modes to test
- read
- write
- name: Run io500 tests
hosts: io500
gather_facts: true
tasks:
- name: Run the io500 tests
ansible.builtin.import_role:
name: stackhpc.fio_perfkit.io500
tags:
- io500
vars:
io500_test_path: "/mnt/share"
io500_stonewall_time: 300
```
### Benchmarks
All benchmarks are time-based - they run for as long as specified in `fio_runtime`. Additionally, the number of files to test IO over (`fio_nrfiles`), the number of IO threads (`fio_numjobs`) and the file size (`fio_size`) can be adjusted.
#### Single device performance
Use fio to test a single device with multiple jobs. This is useful for testing Ceph OSD host db/wal disks.
> [!WARNING]
> This test may break any existing filesystems on the target devices!
#### Single host, multiple device performance
Use fio to test all devices on a host. This is useful for testing the aggregate performance of all OSD disks on OSD hosts.
> [!WARNING]
> This test may break any existing filesystems on the target devices!
#### Aggregate Performance
Filesystem clients are added to the benchmark in turn from one filesystem client, to all filesystem clients. Each clients' contribution to filesystem bandwidth and IOPs is measured and plotted. The benchmark comprises a two-dimensional parameter sweep across multiple IO block-sizes and IO modes.
Useful for measuring saturation of filesystem performance.
#### Mixed IO
All filesystem clients participate in a range of benchmarks. A three-dimensional parameter sweep from 100% read to 100%
write, from 100% random to 100% sequential IOs, and across multiple IO block-sizes is used to assemble the benchmark.
#### io500
Run the io500 using OpenMPI and [io500-singularity](https://github.com/stackhpc/io500-singularity). All members of the
`[io500]` group will participate in the benchmark, and the first host will act as the MPI coordinator.