EBS preheat volume

Is there any other way to beat the EBS PIOPS volume besides the following command?

sudo dd if = / dev / xvdf of = / dev / null bs = 1M

The command above seems to take a longer period of time as the size of the EBS vol increases.

So, in my case, ideally, I want to create a volume using my snapshots and with minimal downtime. I want to use this volume as my mysql data directory, but I want to prepare it beforehand. If there is a way to speed things up, that would be great. However, we are not questioning on the hardware front, we can take as much machine as possible on AWS.

+3


source to share


2 answers


You state that you want to "create volumes using my snapshots", so preheating by writing data is not a good idea. Instead, you must read the data, which will cause the data to be loaded from the snapshot onto your EBS volume.

From Amazon EBS Pre-Progressive Volumes :



When you create any new EBS volume (Shared Type (SSD), Provisioned IOPS (SSD), or Magnetic) or recover a volume from a snapshot, the storage blocks on the back are immediately allocated to you. However , the first time you access a storage block, it must be cleaned up (for new volumes) or created from a snapshot (for recovered volumes) before you can access the block. This preliminary step takes time and can cause a 5-50% IOPS loss for your volume the first time you access each block . Lifetime amortization of these costs is acceptable for most applications. Performance is restored after a single access to the data.

However, you can avoid this performance hit in a production environment by writing or reading all the blocks on your volume before using it; this process is called preheating . Writing to all blocks on the volume is preferred, but this is not an option for volumes that have been recovered from a snapshot, as this will overwrite the recovered data. For a brand new volume created from scratch, you must write all the blocks before using the volume. For a new volume created from a snapshot, you must read all the blocks that have data before using the volume.

Preheating discs (by reading or writing) can take a long time. The larger the disc, the longer it takes. Avoid preheating if possible. Instead, just use it as usual. The worst case is that you will get slightly slower access when each block is first, which is usually not a problem (unless you do speed tests).

+2


source


Unless you're talking about the original performance degradation of access when restoring from a snapshot, preheating is no longer required. See Initializing Amazon EBS Volumes .

If this page goes away, here's an excerpt:



The new EBS volumes get maximum performance the moment they are available and do not require initialization (formerly called preheating). However, storage blocks on volumes that have been recovered from snapshots must be initialized (pulled from Amazon S3 and written to the volume) before you can access the block. This preliminary step is time-consuming and can result in a significant increase in I / O latency the first time each block is accessed. Lifetime amortization of these costs is acceptable for most applications. Performance is restored after the data is available once.

0


source







All Articles