]]>
]]>

IO alignment benchmark on a 4-disk RAID10

This page contains scripts and plain results of the IO alignment benchmarks run on this a 4-disk RAID10 array. For more details see these two blog posts:

Plain Results

In the results:

  1. Baseline - misalignment on the partition table, no LVM and no alignment settings in the file system.
  2. Misalignment on the partition table, but proper alignment options on the file system.
  3. 1M alignment in partition table but no options on the file system.
  4. Partition table and file system properly aligned; sunit/swidth set during mkfs. No LVM at this point.
  5. Partition table aligned properly; sunit/swidth set during mounting but not during mkfs.
  6. Added LVM on top of aligned partition table, used proper file system alignment.

a and b stand for Write-Through and Write-Back benchmarks respectively.

Sequential reads

1G seqrd WT 1th 4th 8th
1a 9644.70 14498.56 16180.11
2a 9636.49 14388.89 16520.83
3a 9506.32 14607.97 16309.53
4a 9373.24 15306.83 16121.24
5a 9619.65 14780.24 16163.76
6a 9508.58 14440.38 16708.07
1G seqrd WB 1th 4th 8th
1b 9436.55 13840.00 16259.78
2b 9031.48 15201.26 16826.38
3b 8886.30 14445.49 16253.93
4b 9012.64 13831.09 16076.49
5b 9088.06 15283.62 16704.36
6b 8615.08 15061.01 15980.04
4G seqrd WT 1th 4th 8th
1a 9488.89 14397.72 16293.56
2a 9501.81 14611.61 16348.42
3a 9490.70 14402.58 16557.55
4a 9543.06 14485.85 16280.83
5a 9619.45 14924.30 16577.60
6a 9380.67 14906.28 16175.53
4G seqrd WB 1th 4th 8th
1b 9473.11 14568.58 16550.56
2b 9082.64 14722.12 16893.95
3b 9339.18 14412.99 16370.65
4b 9297.87 15149.68 16343.38
5b 9426.89 14853.71 16174.98
6b 9183.62 15015.74 16625.25
16G seqrd WT 1th 4th 8th
1a 9316.38 14327.38 16263.49
2a 9168.59 14472.76 16404.45
3a 9558.37 14346.65 16347.28
4a 9583.33 14817.82 16234.04
5a 9530.01 14741.04 16172.15
6a 8826.48 14695.35 16074.81
16G seqrd WB 1th 4th 8th
1b 9204.80 14253.63 16525.61
2b 9631.88 14463.82 16104.77
3b 9570.25 14578.08 16241.91
4b 9414.17 14716.52 16376.27
5b 9418.52 15211.93 16188.11
6b 8413.45 14759.04 16029.77

Sequential writes

1G seqwr WT 1th 4th 8th
1a 245.01 239.85 238.81
2a 250.26 250.03 253.32
3a 238.56 241.40 239.27
4a 253.31 254.09 252.36
5a 255.27 254.62 254.06
6a 260.84 260.61 260.38
1G seqwr WB 1th 4th 8th
1b 7362.63 5687.60 5213.56
2b 8272.26 6569.44 6169.10
3b 7488.57 5521.30 5310.10
4b 8530.95 7080.78 6152.94
5b 8491.74 6426.13 6475.71
6b 8258.82 7013.98 6094.12
4G seqwr WT 1th 4th 8th
1a 236.94 242.41 242.49
2a 251.40 256.35 256.32
3a 232.02 241.06 235.37
4a 252.09 252.24 247.51
5a 253.64 255.89 255.97
6a 248.81 250.41 253.07
4G seqwr WB 1th 4th 8th
1b 7423.11 5704.84 5365.93
2b 8430.48 6344.98 5806.85
3b 7127.58 4693.88 5385.33
4b 8254.28 5567.29 6261.12
5b 8202.48 5137.22 5975.36
6b 8246.72 6942.96 6168.63
16G seqwr WT 1th 4th 8th
1a 235.24 242.82 241.40
2a 240.52 248.22 247.72
3a 232.54 239.85 237.67
4a 242.57 251.75 252.50
5a 247.04 254.47 253.31
6a 252.75 262.27 262.09
16G seqwr WB 1th 4th 8th
1b 7226.32 5192.42 5308.83
2b 8029.62 5510.48 6026.21
3b 7235.52 5661.11 5456.00
4b 8056.69 5868.36 5071.02
5b 7994.88 6376.59 5977.70
6b 7818.30 6833.40 6611.15

Random reads

1G rndrd WT 1th 4th 8th
1a 315.29 751.31 1377.33
2a 315.18 727.58 1385.48
3a 318.05 736.97 1398.55
4a 326.34 826.89 1584.45
5a 331.58 823.96 1580.65
6a 324.78 831.43 1580.26
1G rndrd WB 1th 4th 8th
1b 316.29 917.38 1385.75
2b 323.84 919.46 1380.19
3b 323.85 799.08 1400.49
4b 331.20 939.17 1583.41
5b 331.38 976.32 1578.08
6b 333.48 836.09 1580.46
4G rndrd WT 1th 4th 8th
1a 297.19 689.25 1333.10
2a 295.07 688.97 1338.30
3a 297.92 720.66 1356.77
4a 313.76 812.62 1522.75
5a 308.83 808.35 1526.29
6a 313.02 801.95 1525.93
4G rndrd WB 1th 4th 8th
1b 299.71 882.56 1343.52
2b 305.07 884.66 1334.80
3b 305.18 891.23 1356.86
4b 318.99 975.63 1529.41
5b 318.35 973.91 1527.46
6b 314.41 974.41 1526.33
16G rndrd WT 1th 4th 8th
1a 278.51 810.12 1263.84
2a 282.53 832.23 1271.54
3a 284.04 844.03 1297.30
4a 293.06 922.10 1450.39
5a 295.11 923.89 1443.50
6a 291.02 924.02 1443.25
16G rndrd WB 1th 4th 8th
1b 280.34 832.98 1272.78
2b 280.37 832.68 1276.00
3b 282.48 843.80 1293.01
4b 293.50 927.96 1451.39
5b 290.23 923.18 1449.04
6b 291.37 926.19 1451.88

Random writes

1G rndwr WT 1th 4th 8th
1a 238.48 549.57 733.82
2a 242.66 552.91 730.40
3a 241.14 555.63 742.10
4a 243.32 623.52 852.69
5a 256.85 628.72 852.53
6a 246.75 621.66 847.09
1G rndwr WB 1th 4th 8th
1b 1265.36 1293.42 1250.35
2b 1273.93 1285.01 1247.58
3b 1294.48 1325.37 1286.41
4b 1592.36 1587.21 1549.12
5b 1570.51 1602.43 1554.36
6b 1587.12 1594.14 1559.57
4G rndwr WT 1th 4th 8th
1a 226.60 512.43 670.49
2a 233.26 516.93 670.35
3a 231.92 524.23 683.25
4a 235.00 578.26 778.12
5a 239.41 580.69 782.74
6a 239.70 581.74 782.16
4G rndwr WB 1th 4th 8th
1b 1213.54 1243.43 1238.48
2b 1220.63 1241.18 1236.44
3b 1253.13 1266.01 1266.49
4b 1510.22 1530.74 1525.25
5b 1508.51 1523.96 1527.67
6b 1514.18 1522.52 1519.89
16G rndwr WT 1th 4th 8th
1a 208.65 459.61 585.51
2a 207.87 461.13 591.70
3a 208.46 466.22 599.57
4a 213.69 521.61 685.70
5a 214.71 521.79 688.79
6a 213.44 521.92 690.35
16G rndwr WB 1th 4th 8th
1b 1111.24 1146.25 1149.91
2b 1108.72 1142.69 1145.36
3b 1142.39 1170.65 1174.13
4b 1369.17 1418.61 1417.69
5b 1373.84 1420.40 1417.89
6b 1370.12 1420.18 1417.37

OLTP results

test 1th 4th 8th 16th 32th
1a 189.75 467.08 688.69 803.45 812.88
2a 190.70 467.97 689.07 793.63 820.48
3a 160.93 353.72 566.45 638.02 642.33
4a 200.39 522.37 791.48 919.28 938.60
5a 200.83 523.39 790.59 918.21 936.51
6a 200.77 526.87 792.49 929.04 943.22
1b 206.28 547.77 784.19 891.42 900.79
2b 205.39 546.06 786.41 892.30 906.36
3b 204.50 545.87 790.34 889.33 904.46
4b 214.45 596.03 897.05 1036.70 1056.72
5b 215.02 592.29 895.09 1036.32 1051.84
6b 215.08 601.29 896.74 1039.93 1058.49

FileIO benchmark script

#!/bin/sh
set -u
set -x
set -e
 
bn=$1-file
 
if [ -d /root/benchmarks/$bn ]; then
  echo "ERROR: directory exists, not overwriting results"
  exit 1
else
  mkdir -p /root/benchmarks/$bn
fi
 
mdf=/root/benchmarks/$bn/metadata
echo ===== MegaRAID info >> $mdf
/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL >> $mdf
echo ===== fdisk info >> $mdf
fdisk -lu >> $mdf
echo ===== xfs info >> $mdf
xfs_info /data >> $mdf
echo ===== mount >> $mdf
mount | grep /data >> $mdf
echo ===== my.cnf >> $mdf
cat /etc/mysql/my.cnf >> $mdf
bash /root/bin/summary >> $mdf
echo ===== extra lvm info >> $mdf
pvs -o +pe_start >> $mdf
 
cd /data
 
for size in 1G 4G 16G; do
   for mode in seqwr seqrd rndrd rndwr rndrw; do
      sysbench --test=fileio --file-num=64 --file-total-size=$size --init-rng=on --file-extra-flags=direct prepare
      # make sure files are not in cache
      for f in /data/test_file.*; do
         /root/bin/uncache $f
      done
      for threads in 1 4 8; do
         echo "====== testing $threads threads"
         echo PARAMS $size $mode $threads > /root/benchmarks/$bn/sysbench-size-$size-mode-$mode-threads-$threads
         sysbench --test=fileio --file-total-size=$size --file-test-mode=$mode \
            --max-time=60 --max-requests=100000000 --num-threads=$threads --init-rng=on \
            --file-num=64 --file-extra-flags=direct --file-fsync-freq=0 --file-block-size=16384 run \
            | tee -a /root/benchmarks/$bn/sysbench-size-$size-mode-$mode-threads-$threads 2>&1
      done
      sysbench --test=fileio --file-total-size=$size cleanup
   done
done

FileIO benchmark script

#!/bin/sh
set -u
set -x
set -e
 
bn=$1-oltp
if [ -d /root/benchmarks/$bn ]; then
  echo "ERROR: directory exists, not overwriting results"
  exit 1
else
  mkdir -p /root/benchmarks/$bn
fi
 
mdf=/root/benchmarks/$bn/metadata
echo ===== MegaRAID info >> $mdf
/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL >> $mdf
echo ===== fdisk info >> $mdf
fdisk -lu >> $mdf
echo ===== xfs info >> $mdf
xfs_info /data >> $mdf
echo ===== mount >> $mdf
mount | grep /data >> $mdf
echo ===== my.cnf >> $mdf
cat /etc/mysql/my.cnf >> $mdf
bash /root/bin/summary >> $mdf
echo ===== extra lvm info >> $mdf
pvs -o +pe_start >> $mdf
 
mysql -e "create database sbtest"
sysbench --test=oltp --oltp-table-size=20000000 --oltp-read-only=off --oltp-skip-trx=on --init-rng=on --max-requests=0 --oltp-dist-type=uniform --mysql-user=root prepare
 
for threads in 1 4 8 16 32; do
   vmstat 5 > /root/benchmarks/$bn/sysbench-oltp-threads-$threads-vmstat 2>&1 & vpid=$!
   while sleep 5; do cat /proc/diskstats >> /root/benchmarks/$bn/sysbench-oltp-threads-$threads-diskstats; date +'TS %s.%N %F %T' >> /root/benchmarks/$bn/sysbench-oltp-threads-$threads-diskstats; done  & dpid=$!
   mpstat -P ALL 5 >> /root/benchmarks/$bn/sysbench-oltp-threads-$threads-mpstat 2>&1 & mpid=$!
   sysbench --test=oltp --oltp-table-size=20000000 --oltp-read-only=off --oltp-skip-trx=on --init-rng=on --num-threads=$threads --max-requests=0 --oltp-dist-type=uniform --max-time=300 --mysql-         user=root run | tee -a /root/benchmarks/$bn/sysbench-oltp-threads-$threads 2>&1
   kill $vpid $dpid $mpid
done
sysbench --test=oltp --oltp-table-size=20000000 --oltp-read-only=off --oltp-skip-trx=on --init-rng=on --max-requests=0 --oltp-dist-type=uniform --mysql-user=root cleanup

Script to start both benchmarks

#!/bin/bash
 
TESTN=7
 
# fdisk /dev/sda
# partprobe
# make sure changes are saved and:
# screen
# /root/benchmarks/script.sh
mkfs="mkfs.xfs -d su=64k,sw=2 -f /dev/mapper/Volume00-LogVol00"
mount="mount -o nobarrier,inode64 /dev/mapper/Volume00-LogVol00 /data"
 
/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WT -Immediate -Lall -aALL
if $(grep /data /etc/mtab >/dev/null); then
  umount /data
fi
 
TEST="$TESTN"a
 
$mkfs
$mount
/root/benchmarks/script-file.sh $TEST
umount /data
sleep 10
 
$mkfs
$mount
cp -dpR /var/lib/mysql /data/mysql
/etc/init.d/mysql start
/root/benchmarks/script-oltp.sh $TEST
/etc/init.d/mysql stop
umount /data
sleep 10
 
/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WB -Immediate -Lall -aALL
 
TEST="$TESTN"b
 
$mkfs
$mount
/root/benchmarks/script-file.sh $TEST
umount /data
sleep 10
 
$mkfs
$mount
cp -dpR /var/lib/mysql /data/mysql
/etc/init.d/mysql start
/root/benchmarks/script-oltp.sh $TEST
/etc/init.d/mysql stop
umount /data
sleep 10

Other scripts

Plain results:

#! /bin/bash
 
root=.
 
if [[ $# -lt 2 ]]; then
   echo "Usage: $0 (1G|4G|16G) (seqwr|seqrd|rndrd|rndwr|rndrw)"
   exit 1
fi
 
size=$1
mode=$2
 
t=file
   echo ===== $t benchmark: $size total size, $mode mode
   printf "test       1th       4th       8th\n"
   for b in 1a 2a 3a 4a 5a 6a 1b 2b 3b 4b 5b 6b; do
   printf "%4s" $b
      for th in 1 4 8; do
         bf=$root/$b-$t/sysbench-size-$size-mode-$mode-threads-$th
         if [ -f $bf ]; then
            res=$(awk '/Requests\/sec executed/ {print $1}' $bf)
         else
            res=-1
         fi
         printf "%10.2f" $res
      done
      echo
   done

Results for csv import (used for google docs):

#! /bin/bash
 
root=.
 
if [[ $# -lt 2 ]]; then
   echo "Usage: $0 (1G|4G|16G) (seqwr|seqrd|rndrd|rndwr|rndrw)"
   exit 1
fi
 
size=$1
mode=$2
 
t=file
   printf "%s %s WT,       1th,       4th,       8th\n" $size $mode
   for b in 1a 2a 3a 4a 5a 6a; do
   printf "%4s," $b
      for th in 1 4 8; do
         bf=$root/$b-$t/sysbench-size-$size-mode-$mode-threads-$th
         if [ -f $bf ]; then
            res=$(awk '/Requests\/sec executed/ {print $1}' $bf)
         else
            res=-1
         fi
         printf "%10.2f," $res
      done
      echo
   done
   printf "%s %s WB,       1th,       4th,       8th\n" $size $mode
   for b in 1b 2b 3b 4b 5b 6b; do
   printf "%4s," $b
      for th in 1 4 8; do
         bf=$root/$b-$t/sysbench-size-$size-mode-$mode-threads-$th
         if [ -f $bf ]; then
            res=$(awk '/Requests\/sec executed/ {print $1}' $bf)
         else
            res=-1
         fi
         printf "%10.2f," $res
      done
      echo
   done

Oltp plain results:

#! /bin/bash
 
root=.
 
t=oltp
   echo ===== $t benchmark
   printf "test       1th       4th       8th    16th    32th\n"
   for b in 1a 2a 3a 4a 5a 6a 1b 2b 3b 4b 5b 6b; do
   printf "%4s" $b
      for th in 1 4 8 16 32; do
         bf=$root/$b-$t/sysbench-oltp-threads-$th
         if [ -f $bf ]; then
            res=$(awk '/read\/write requests/{print $3/300}' $bf)
         else
            res=-1
         fi
         printf "%10.2f" $res
      done
      echo
   done

Oltp results for csv import

#! /bin/bash
 
root=.
 
t=oltp
   printf "test,       1th,       4th,       8th,    16th,    32th\n"
   for b in 1a 2a 3a 4a 5a 6a 1b 2b 3b 4b 5b 6b; do
   printf "%4s," $b
      for th in 1 4 8 16 32; do
         bf=$root/$b-$t/sysbench-oltp-threads-$th
         if [ -f $bf ]; then
            res=$(awk '/read\/write requests/{print $3/300}' $bf)
         else
            res=-1
         fi
         printf "%10.2f," $res
      done
      echo
   done
 
benchmark/io-alignment/4-disk_raid10.txt · Last modified: 2011/09/15 16:16 by rodrigo.gadea
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Contact Us 24 Hours A Day
SupportContact us 24×7
Emergency? Contact us for help now!
Sales North America(888) 316-9775 or
(208) 473-2904
Sales
Europe
+44-208-133-0309 (UK)
0-800-051-8984 (UK)
0-800-181-0665 (GER)
Training(855) 55TRAIN or
(925) 271-5054

 

Share This
]]> ]]>