Skip to content

Instantly share code, notes, and snippets.

@saitara
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saitara/2356554cf562b30dec8e to your computer and use it in GitHub Desktop.
Save saitara/2356554cf562b30dec8e to your computer and use it in GitHub Desktop.
AWS インスタンス別ネットワーク帯域・InstanceStore IOPS測定 ref: http://qiita.com/saitara/items/882a3e70639637e24a4f
#!/bin/sh
INSTANCE_TYPE=$(curl -s http://169.254.169.254/2014-11-05/meta-data/instance-type)
yum install fio -y
umount /media/ephemeral0
time dd if=/dev/zero of=/dev/xvdb bs=1M
sudo mkfs.ext4 /dev/xvdb
mount /media/ephemeral0
for i in `seq 0 3`;do
time fio -name=random-write \
--output=/home/ec2-user/${INSTANCE_TYPE}-${i}.txt \
-ioengine=libaio \
-rw=randrw \
-rwmixread=0 \
-bs=16k \
-numjobs=16 \
-iodepth=16 \
-size=100m \
-direct=1 \
-directory=/media/ephemeral0 \
-group_reporting
cat /home/ec2-user/${INSTANCE_TYPE}-${i}.txt
done
poweroff
iperf -c %LOCAL_IP_ADDRESS% -t 60
iperf -c %LOCAL_IP_ADDRESS% -t 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment