Created
June 27, 2023 07:28
-
-
Save Gabson1/5d07bd5ed1f749eca521c97b0fe6e2ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
Reset='\033[0m' | |
Red='\033[0;31m' | |
Green='\033[0;32m' | |
Yellow='\033[0;33m' | |
WORK_DIR="${WORK_DIR:-/fio/results}" | |
CONFIG_FILE="${CONFIG_FILE:-iops-config.fio}" | |
# shellcheck disable=SC2116 | |
config=$(echo "${CONFIG_FILE%.*}") | |
echo "" | |
echo -e "${Yellow}========================================" | |
echo -e "Running benchmark test via \"$config\"" | |
echo -e "=========================================${Reset}" | |
echo "" | |
prefix="randrw-iodepth_256-bs_4ki" | |
mkdir -p results | |
mkdir -p results/bw | |
mkdir -p results/iops | |
mkdir -p results/lat | |
fio "$CONFIG_FILE" --name="performance" | |
#--output=results/"$prefix".json --output-format=json | |
#--write_bw_log=results/bw \ | |
#--write_iops_log=results/iops \ | |
#--write_lat_log=results/lat \ | |
#--directory=results | |
echo "" | |
echo -e "${Yellow}========================================" | |
echo -e "Benchmark tests have concluded, logs have been written to \"$WORK_DIR\"" | |
echo -e "=========================================${Reset}" | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM bitnami/minideb:latest | |
USER root | |
RUN apt-get update && \ | |
apt-get install -y fio | |
RUN mkdir "/fio" | |
WORKDIR /fio | |
COPY ./src/** . | |
ENV CONFIG_FILE="iops-config.fio" | |
ENV WORK_DIR="/fio/results" | |
RUN chmod +x ./benchmark.sh | |
CMD ["./benchmark.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
bs=4K | |
iodepth=256 | |
direct=0 | |
ioengine=libaio | |
group_reporting | |
time_based | |
runtime=900 | |
numjobs=4 | |
rw=randrw | |
size=50% | |
rwmixread=60 | |
rwmixwrite=40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: consumer-pvc | |
spec: | |
storageClassName: rook-ceph-block | |
volumeMode: Block | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 10Gi | |
--- | |
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: consumer | |
spec: | |
imagePullSecrets: | |
- name: nexus | |
containers: | |
- name: consumer | |
image: fio-benchmarking:v1 | |
#command: ["/bin/bash", "-c", "./benchmark.sh latency-config.fio"] | |
volumeDevices: | |
- name: storage | |
devicePath: "/fio" | |
volumes: | |
- name: storage | |
persistentVolumeClaim: | |
claimName: consumer-pvc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment