New EBS Volumes always experience a “First Use Penalty” in AWS;
means there will be a performance hit on the first write to an unused block on
the EBS Volume and will perform slower than subsequent writes. During this time
you can experience spike in volume metrics like service times, I/O latency and
then subsequently leading to normalization. It is observed that 5 to 50 percent
reduction in IOPS when you first access the data on a volume. Performance is
restored after the data is accessed once. Therefore, it is recommended that you
read or write to all the blocks on your volume before you use it.
$ dd if=/dev/md0 of=/dev/null
In Linux, the above command reads from all blocks on a
volume and pre-warms the volume. On Windows, formatting the new EBS volume
pre-warms it.
“dd” is not verbose by default so download and use the following
script from the github, it shows the status of the pre warming of EBS Volumes, URL: https://gist.github.com/muhqu/3293988
#!/bin/bash
if [ -z "$1" ];
echo "Usage: sudo $0 /dev/sdh1"
exit 1;
fi
dd if=$1 of=/dev/null & pid=$!
while true; do
ps -p$pid --no-heading || break;
echo "-- $(date)
------------------";
kill -USR1 $pid;
sleep 60s;
done
echo "-- $(date)
------------------";
echo "DONE \o/"
|
EBS Article Series (continued..)
Part 1: Understanding Amazon Elastic Block Store
Part 2: Understanding Standard EBS Volumes
Part 3: Understanding EBS PIOPS Volumes
Part 4: Understanding EBS-Optimized Instances
Part 5: Understanding Latency in EBS
Part 7: 10% of your provisioned IOPS 99.9% of the time
Part 8: Performance Tuning - Pre Warming the EBS volume
Part 9: Performance Tuning - EBS Striping
Part 10: Performance Tuning - IO Block Size
Part 11: Understanding Amazon EBS Snapshots
Part 12: Securing Amazon EBS volumes - EBS Encryption using SecureCloud
Part 13: Amazon EBS Security Best practices and tips
Part 1: Understanding Amazon Elastic Block Store
Part 2: Understanding Standard EBS Volumes
Part 3: Understanding EBS PIOPS Volumes
Part 4: Understanding EBS-Optimized Instances
Part 5: Understanding Latency in EBS
Part 7: 10% of your provisioned IOPS 99.9% of the time
Part 8: Performance Tuning - Pre Warming the EBS volume
Part 9: Performance Tuning - EBS Striping
Part 10: Performance Tuning - IO Block Size
Part 11: Understanding Amazon EBS Snapshots
Part 12: Securing Amazon EBS volumes - EBS Encryption using SecureCloud
Part 13: Amazon EBS Security Best practices and tips
No comments:
Post a Comment