Skip to content

Instantly share code, notes, and snippets.

@zmc
Last active November 10, 2020 23:25
Show Gist options
  • Save zmc/63ac22414a3bd4d42fd13cf11dc7f5ab to your computer and use it in GitHub Desktop.
Save zmc/63ac22414a3bd4d42fd13cf11dc7f5ab to your computer and use it in GitHub Desktop.
FIO on Power reproducer
---
apiVersion: v1
kind: Namespace
metadata:
name: fio-test
---
apiVersion: v1
kind: Pod
metadata:
name: fio-test
namespace: fio-test
spec:
containers:
- image: nginx
name: fio-test
volumeMounts:
- mountPath: /var/lib/www/html
name: fio-test
volumes:
- name: fio-test
persistentVolumeClaim:
claimName: fio-test
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fio-test
namespace: fio-test
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
storageClassName: ocs-storagecluster-cephfs
set -x
oc create -f ./fio-ns.yaml
sleep 5
oc create -f ./fio-pvc.yaml
sleep 5
oc create -f ./fio-pod.yaml
sleep 20
oc rsh -n fio-test fio-test apt update
oc rsh -n fio-test fio-test apt install -y fio
set -x
oc delete pod -n fio-test fio-test
oc delete pvc -n fio-test fio-test
oc delete namespace fio-test
set -ex
RUNS=0
while true; do
time oc rsh -n fio-test fio-test fio --name=fio-rand-readwrite --filename=/var/lib/www/html/fio-rand-readwrite --readwrite=randrw --bs=4K --direct=1 --numjobs=1 --time_based=1 --runtime=60 --size=1G --iodepth=4 --invalidate=1 --fsync_on_close=1 --rwmixread=75 --ioengine=libaio --rate=1m --rate_process=poisson --output-format=json
echo "fio rc: $?"
RUNS=$(echo $RUNS+1 | bc)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment