https://github.com/kvaps/docker-fio
Fio in the docker
https://github.com/kvaps/docker-fio
Last synced: 5 months ago
JSON representation
Fio in the docker
- Host: GitHub
- URL: https://github.com/kvaps/docker-fio
- Owner: kvaps
- License: mit
- Created: 2018-03-20T14:29:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-06T09:00:45.000Z (over 1 year ago)
- Last Synced: 2025-08-25T06:47:20.820Z (10 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Containerized fio
For testing clustered storage systems
* [Massfio](https://github.com/kvaps/massfio/)
* [Fio](https://github.com/kvaps/docker-fio/)
### Deploy
**Docker run:**
```bash
docker run --rm -ti -p 8765:8765 kvaps/fio --server
```
**Kubernetes run:**
```yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: fio
spec:
selector:
matchLabels:
app: fio
serviceName: "fio"
replicas: 3
template:
metadata:
labels:
app: fio
spec:
containers:
- name: fio
image: ghcr.io/kvaps/fio:3.38
args: [ "--server" ]
ports:
- name: fio
containerPort: 8765
volumeMounts:
- name: data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "my-storage-class"
resources:
requests:
storage: 10Gi
```
### Usage
**write config**
```
cat > test.ini <<\EOT
[readtest]
blocksize=4k
filename=/data/test_file
rw=randread
direct=1
buffered=0
ioengine=libaio
iodepth=256
runtime=120
filesize=8G
[writetest]
blocksize=4k
filename=/data/test_file
rw=randwrite
direct=1
buffered=0
ioengine=libaio
iodepth=16
runtime=120
filesize=8G
EOT
```
**Run single test**
```bash
docker run --net=host -ti --rm -v "$PWD:/config" kvaps/fio --client=10.112.0.104 /config/test.ini
```
**Run multiple test**
First you need to know all IPs for your fio pods:
```
kubectl get pod -l app=fio -o custom-columns=IP:.status.podIP | tail -n+2 | xargs
```
Then you can run massfio script with them:
```bash
# Run massfio container
docker run --net=host -ti --rm -v "$PWD:/config" -v "$PWD/results:/results" kvaps/massfio
# Run test
timeout 10m /massfio.sh /config/test.ini 10.112.0.104 10.112.0.105 10.112.0.106
# Parse results
/massfio_parse.sh /results
```