# auto-fio-py **Repository Path**: storage-test/auto-fio-py ## Basic Information - **Project Name**: auto-fio-py - **Description**: 测试工具自动化系列之FIO:fio自动执行、结果分析。python实现。 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-08 - **Last Updated**: 2026-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # auto-fio #### 介绍 测试工具自动化系列之FIO:fio自动执行、结果分析。python实现。 #### 安装教程 1. python3环境运行 2. 编译二进制文件运行 #### 使用说明 测试命令示例: 1. perf1 ```shell script # 条件组合执行 ./auto_fio perf1 --target /mnt/perf/ --rw write --rw read --numjobs 1 --bs 4k --filesize 128M # 模板一:定时测试,指定运行时间(create-job-only) ./auto_fio perf1 --target /mnt/perf/ --rw write --rw read --create-job-only --runtime 180 --numjobs 20 --bs 16380K,16M --filesize 128M,1G # 模板二:定量测试1,指定每个job运行文件数量+大小(create-job-only) ./auto_fio perf1 --target /mnt/perf/ --rw write --rw read --create-job-only --numjobs 20 --bs 16380K,16M --filesize 128M,1G --jobsize 1G # 模板三:定量测试2,指定测试文件总大小(create-job-only) ./auto_fio perf1 --target /mnt/perf/ --rw write --rw read --create-job-only --numjobs 20 --bs 16380K,16M --filesize 128M,1G --size 100G # 测试 numjobs && iodepth 最优值(create-job-only) ./auto_fio perf1 --target /mnt/perf/ --rw write --create-job-only --runtime 60 --numjobs 8,12,16 --iodepth 1 --bs 16380K --filesize 128M ./auto_fio perf1 --target /mnt/perf/ --rw write --create-job-only --runtime 60 --numjobs 16 --iodepth 1,2,4 --bs 16380K --filesize 128M ./auto_fio perf1 --target /mnt/perf/ --rw write --create-job-only --runtime 60 --numjobs 8,12,16 --iodepth 1,2,4 --bs 16380K --filesize 128M # jobname包含后缀 # t001_16380K_write_iodepth1 # t001_16380K_write_iodepth2 # t001_16380K_write_iodepth4 ./auto_fio perf1 --target /mnt/perf/ --rw write --create-job-only --runtime 60 --numjobs 16 --iodepth 1,2,4 --bs 16380K --filesize 128M --jobname-keys iodepth ``` 2. perf2 ```shell script ./auto_fio perf2 --client ./client_list -f t001_16M_write.job # 收集 metrics ./auto_fio perf2 --client ./client_list -f t001_16M_write.job --testbed ./testbed.yaml --collect-metrics # 每次测试任务完成后间隔指定时间后,再启动下一个job任务 ./auto_fio perf2 --client ./client_list -f t001_16M_write.job --testbed ./testbed.yaml --collect-metrics --interval 60 ``` 3. report ```shell script ./auto_fio report --data-path D:\workspace\src\auto-fio\example\perf2\simple1\output ``` #### 输出目录 ``` root@txu:~/txu/fio-test/log# tree simple simple ├── fio.log ├── report.xlsx └── output └── metric └── workload └── t001 └── randrw30 ```