Skip to content

Latest commit

 

History

History
109 lines (90 loc) · 1.82 KB

README.md

File metadata and controls

109 lines (90 loc) · 1.82 KB

Containerized fio

For testing clustered storage systems

Deploy

Docker run:

docker run --rm -ti -p 8765:8765 kvaps/fio --server

Kubernetes run:

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: kvaps/fio:latest
        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

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:

# 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