Skip to content

Commit 41bfc26

Browse files
committed
Forked for SRE Handbook defaults
1 parent fbe9c86 commit 41bfc26

File tree

4 files changed

+46
-75
lines changed

4 files changed

+46
-75
lines changed

README.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
# fio-kubernetes
1+
# fio k8s
22

3-
Example approaches for running parallel FIO tests in Kubernetes to test either RWO or RWX volumes.
3+
Forked to have better defaults sourced from the [SRE
4+
Handbook](https://s905060.gitbooks.io/site-reliability-engineer-handbook/content/fio.html).
45

5-
For more detailed explanations please see the [accompanying blog post](https://medium.com/@joshua_robinson/storage-benchmarking-with-fio-in-kubernetes-14cf29dc5375).
6+
# Proxmox 6.4 VE
67

7-
Two different approaches are shown: 1) a simple deployment and PVC for RWX volumes and 2) a statefulset for RWO/RWX. Tradeoffs between the two approaches discussed below.
8+
My use case is to test a base install of the following stack:
89

9-
FIO job configs are stored as a configMap object in configs.yaml. There is currently one config, but additional configs could be added.
10+
1. 3x Dell R620 servers
11+
* Each: CPU(s) 32 x Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (2 Sockets)
12+
* 256 MB Ram
13+
* 4x 556GB SAAS drives
14+
2. Proxmox 6.4 VE
15+
3. ZFS Raid 10
16+
4. Debian 10 VM
17+
5. Kubernetes 1.21.0
18+
6. 3x controller nodes
19+
7. 4x worker nodes
1020

11-
The docker image is a simple Alpine image based on FIO and is only ~10MB in size.
21+
With a relatively un-tuned system the system is brought to a halt. The kube
22+
API starts failing with errors related to etcd storage. Luckily, deleting the
23+
deployment quickly resolves the situation.
1224

13-
Deployment + PVC : The deployment makes scaling simple, with all pods connecting to the same dynamically provisioned persistentVolume and using a different output path to avoid collisions. This approach requires a single RWX volume, testing performance on a single shared filesystem.
25+
```
26+
Error from server: etcdserver: request timed out
27+
```
1428

15-
Statefulset: each replica creates it's own volume, making this approach suitable for RWO volumes as well as RWX. Note that some shared filesystems will perform better if each node is using it's own filesystem, i.e., no true sharing.
29+
# Reference
30+
31+
Forked from [this post](https://medium.com/@joshua_robinson/storage-benchmarking-with-fio-in-kubernetes-14cf29dc5375)

configs.yaml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@ apiVersion: v1
44
metadata:
55
name: fio-job-config
66
data:
7+
# https://s905060.gitbooks.io/site-reliability-engineer-handbook/content/fio.html
8+
# 8K block, 16 jobs
79
fio.job: |-
810
[global]
9-
ioengine=psync
11+
ioengine=libaio
12+
iodepth=128
13+
rw=randrw
14+
bs=8K
1015
direct=1
11-
buffered=0
12-
size=10G
13-
iodepth=1000
14-
numjobs=100
16+
size=1G
17+
numjobs=12
18+
ramp_time=5
19+
runtime=60
20+
time_based
1521
group_reporting
16-
refill_buffers
17-
rwmixread=80
18-
norandommap
19-
randrepeat=0
20-
percentage_random=0
21-
bs=512K
22-
buffer_compress_percentage=50
23-
rw=read
2422
[testjob]

fio_deployment_pvc.yaml renamed to fio.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ spec:
1515
labels:
1616
app: fio
1717
spec:
18+
affinity:
19+
podAntiAffinity:
20+
requiredDuringSchedulingIgnoredDuringExecution:
21+
- labelSelector:
22+
matchExpressions:
23+
- key: app
24+
operator: In
25+
values:
26+
- fio
27+
topologyKey: "kubernetes.io/hostname"
1828
containers:
1929
- name: fio
2030
image: joshuarobinson/fio:3.19
@@ -32,17 +42,4 @@ spec:
3242
configMap:
3343
name: fio-job-config
3444
- name: fio-data
35-
persistentVolumeClaim:
36-
claimName: fio-claim
37-
---
38-
kind: PersistentVolumeClaim
39-
apiVersion: v1
40-
metadata:
41-
name: fio-claim
42-
spec:
43-
storageClassName: pure-file
44-
accessModes:
45-
- ReadWriteMany
46-
resources:
47-
requests:
48-
storage: 1Ti
45+
emptyDir: {}

fio_statefulset.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)