-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfio_test_custom.sh
80 lines (74 loc) · 1.84 KB
/
fio_test_custom.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
# Credit: https://cloud.google.com/compute/docs/disks/benchmarking-pd-performance
TEST_DIR=$1
mkdir -p $TEST_DIR
# Test write throughput by performing sequential writes with multiple parallel streams (8+), using an I/O block size of 1 MB and an I/O depth of at least 64:
fio \
--name=write_throughput \
--directory=$TEST_DIR \
--numjobs=4 \
--size=100M \
--time_based \
--runtime=60s \
--ramp_time=2s \
--ioengine=libaio \
--direct=1 \
--verify=0 \
--bs=1M \
--iodepth=64 \
--rw=write \
--group_reporting=1
# Clean up
rm -f $TEST_DIR/write* $TEST_DIR/read*
# Test write IOPS by performing random writes, using an I/O block size of 4 KB and an I/O depth of at least 64:
fio \
--name=write_iops \
--directory=$TEST_DIR \
--size=100M \
--time_based \
--runtime=60s \
--ramp_time=2s \
--ioengine=libaio \
--direct=1 \
--verify=0 \
--bs=4K \
--iodepth=64 \
--rw=randwrite \
--group_reporting=1
# Clean up
rm -f $TEST_DIR/write* $TEST_DIR/read*
# Test read throughput by performing sequential reads with multiple parallel streams (8+), using an I/O block size of 1 MB and an I/O depth of at least 64:
fio \
--name=read_throughput \
--directory=$TEST_DIR \
--numjobs=4 \
--size=100M \
--time_based \
--runtime=60s \
--ramp_time=2s \
--ioengine=libaio \
--direct=1 \
--verify=0 \
--bs=1M \
--iodepth=64 \
--rw=read \
--group_reporting=1
# Clean up
rm -f $TEST_DIR/write* $TEST_DIR/read*
# Test read IOPS by performing random reads, using an I/O block size of 4 KB and an I/O depth of at least 64:
fio \
--name=read_iops \
--directory=$TEST_DIR \
--size=100M \
--time_based \
--runtime=60s \
--ramp_time=2s \
--ioengine=libaio \
--direct=1 \
--verify=0 \
--bs=4K \
--iodepth=64 \
--rw=randread \
--group_reporting=1
# Clean up
rm -f $TEST_DIR/write* $TEST_DIR/read*