nfs-perf is a Python tool for automated performance testing of NFS (Network File System) storage using fio. It runs a matrix of fio tests with various parameters and aggregates the results into a CSV file for further analysis.
- Python 3.8+
- Poetry for dependency management
fioinstalled on the system- NFS mount point available (default:
/mnt/nfs)
Advice - use venv in project
poetry config virtualenvs.in-project trueClone the repository and install dependencies:
git clone git@github.com:RMamonts/nfs-perf.git
cd nfs-perf
poetry install- Make sure your NFS share is mounted (default:
/mnt/nfs). - Run the benchmark:
poetry run nfs-perf3.Results will be saved as a CSV file in the project directory (e.g., fio_performance_YYYYMMDD_HHMMSS.csv).
You can change test parameters in src/nfs_perf/runner.py by editing the FIO_PARAMS dictionary:
FIO_PARAMS = {
"operations": ["read", "write"],
"numjobs": [1, 2, 4, 8, 16],
"block_sizes": ["4k", "8k", "16k", "256k", "512k", "1M"],
"iodepths": [1, 4, 8, 16],
"runtime_seconds": 5,
"direct": 0,
"directory": "/mnt/nfs",
"file_size": "1G",
}-
Lint code with Ruff:
poetry run ruff check . -
Run tests:
poetry run pytest
MIT License