views:

34

answers:

2

I have seen advice to 'warm up' EC2 to overcome a first write penalty:-

Warm up data partitions - There is one drawback to using disk IO in EC2: a “first write” performance hit when initially writing to new partitions. To avoid this penalty, you can “warm up” the partition by executing a sort of throw-away command that accesses it. For example, you can use the Linux dd command to write to the disk. While the penalty still occurs and cannot be avoided, at least the first write to your databases will not suffer the effects.

Source: http://answers.oreilly.com/topic/1345-getting-the-most-out-of-mysql-in-the-amazon-cloud/

...but I haven't found any further advice on best practice! Is this true of EBS storage? Can anyone recommend the 'dd' syntax that will perform this warmup and how to ensure that all blocks are 'warmed'?

A: 

Have you asked this question on the AWS forums? I'm sure the EC2/EBS teams would likely be able to help you out there.

Ryan Parman
A: 

Thanks for the pointer to AWS forum. I did post the question there after posting here, and received a response from Jason@AWS. The thread is here:-

http://developer.amazonwebservices.com/connect/message.jspa?messageID=198413#198413

...and his response was:-

There is a first- read penalty for EBS volumes created from snapshots, as the volume is made available before all of the blocks have been successfully loaded. You can negate this penalty by forcing every block on the volume to be read:

$ dd if=/dev/<device> of=/dev/null

Purpletoucan