So during preparation of XtraDB template for EC2 I wanted to understand what IO characteristics we can expect from EBS volume ( I am speaking about single volume, not RAID as in my previous post). Yasufumi did some benchmarks and pointed me on interesting behavior, there seems several level of caching on EBS volume.
Let me show you. I did sysbench random read IO benchmark on files with size from 256M to 5GB with step 256M. And, as Morgan pointed me, I previously made first write, to avoid first-write penalty:
|
1 |
dd if=/dev/zero of=/dev/sdk bs=1M |
for reference script is:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#!/bin/sh set -u set -x set -e for size in `seq 256 256 5888`; do for mode in rndrd; do ./sysbench --test=fileio --file-num=1 --file-total-size=${size}M prepare for threads in 1; do echo PARAMS $size $mode $threads > sysbench-size-$size-mode-$mode-threads-$threads ./sysbench --test=fileio --file-total-size=${size}M --file-test-mode=$mode --max-time=60 --max-requests=10000000 --num-threads=$threads --init-rng=on --file-num=1 --file-extra-flags=direct --file-fsync-freq=0 run >> sysbench-size-$size-mode-$mode-threads-$threads 2>&1 done ./sysbench --test=fileio --file-total-size=${size}M cleanup done done |
And raw results (for m.large instance, though for m.xlarge it was similar) are available on page
https://spreadsheets.google.com/ccc?key=0AjsVX7AnrCYwdFlBVW9KWVJGUGFqeVdpUHY0Y0VXYXc&hl=en, see Sheet “256_5GB filesize”.
Results in graph are:

So can you see several levels of results
256M-1.25G , 1.5G – 2.25G, 2.5G + .
With 1.5G-2.25G we see performance comparable with RAID10 on 4 disks, and with
2.5G+ results are similar for single HDD performance.
So we may guess the schema of storage is

So running InnoDB on database bigger 2.5G, you may expect performance as from single HDD, and you may consider some RAID setup, see my previous post
EC2/EBS single and RAID volumes IO benchmark