Introduction to EBS Pre-Warmer
When a new EBS volume is created or a volume from a snapshot is restored, the back-end storage blocks are allocated immediately. However, the first time you access a block of storage, it must be either wiped clean (for new volumes) or instantiated from its snapshot (for restored volumes) before you can access the block. This preliminary action requires time and can cause a 5 to 50 percent loss of IOPS for your volume the first time each block is accessed. For most applications, amortizing this cost over the lifetime of the volume is acceptable. Performance is restored after the data is accessed once.
However, you can avoid this performance hit in a production environment by writing to or reading from all of the blocks on your volume before you use them; this process is called pre-warming. Writing to all of the blocks on a volume is preferred, but is not an option for volumes restored from a snapshot, because that would overwrite the restored data. For a completely new volume created from scratch, you should write to all blocks before using the volume. For a new volume created from a snapshot, you should read all the blocks that have data before using the volume.
Elastic Cloud Gate offers a feature that allows you to pre-warm EBS volumes. It works as follows:
After selecting EBS volumes to be run by the pre-warming process, Elastic Cloud Gate will launch t1.micro Linux Instance and attach selected volumes. You might be charged for this Instance by Amazon AWS \$0.02 /h.
The launched Instance executes a script that pre-warms all attached volumes. This process can require from a few minutes to several hours depending on size and amount of attached volumes. For example, to pre-warm 1TB volume can take up to 30h.
The warmer Instance is launched per region and per availability zone also, either per new volumes or volumes restored from snapshot. You are not able to mix different types of EBS (new or restored from snapshot) under the same warmer server. You can attach maximum of 10 volumes per warmer.
When the pre-warming process is complete, you receive a notification email and the warmer instance is terminated.
How to setup warmer:
From Dashboard, click Pre-Warmer.
Click Create New Warmer.
Select Availability Zone and Volume Type; the volume must not be attached to any Instance.
Select volumes (up to 10 volumes can be attached to the same warmer).
Click Create Warmer.
If you have more than 10 volumes or the volumes are spread across different availability zones, you can create another warmer by following steps 2 through 5.