How long will it take to create a new EBS volume from a 1TB snapshot

amazon ec2amazon-ebsamazon-web-servicesdisaster-recoverysnapshot

I am taking periodic snapshots of a 1TB EBS (Amazon Web Services Elastic Block Store) volume as backup. In the case of the whole AZ (Availability Zone) becoming unavailable, my Disaster Recovery plan is to create a new EBS volume from the latest snapshot in another AZ in the same region.

How can I figure out how long it will take to create the new EBS volume? I have an RTO (Recovery Time Objective) of 6 hours. Can I meet it with this approach?

It probably shouldn't/doesn't make any difference, but I am in the ap-southeast-2 region (i.e. Sydney).

Best Answer

How can I figure out how long it will take to create the new EBS volume?

Create one.

And then, try using it. Continue using it over a period of hours and days, and note what you observe.

The first answer to your question is that it actually only takes a few seconds.

The problem with that answer is that it doesn't tell the whole story:

New volumes created from existing EBS snapshots load lazily in the background. This means that after a volume is created from a snapshot, there is no need to wait for all of the data to transfer from Amazon S3 to your EBS volume before your attached instance can start accessing the volume and all its data. If your instance accesses data that hasn't yet been loaded, the volume immediately downloads the requested data from Amazon S3, and continues loading the rest of the data in the background.

However, you have to understand what the term "immediately" means, here. Immediately does not mean the volume is as fast, initially, as it will eventually be. Remember: the difference between microseconds and milliseconds seems intuitively small but it is still a factor of 1,000.

[...] storage blocks on volumes that were restored from snapshots must be initialized (pulled down from Amazon S3 and written to the volume) before you can access the block.

This preliminary action takes time and can cause a significant increase in the latency of an I/O operation the first time each block is accessed.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-initialize.html

This is my point, above -- creating the volume only requires a matter of seconds, at which point it is usable, but slow.

EBS volumes are logical entities. When a volume is restored from a snapshot, every block on the volume is logically present and logically available as soon as the new volume becomes available, but not necessarily physically present on the volume the first time you try to read it.

The lag in loading the blocks is, overall, a small price to pay for the immediate availability of any specific block anywhere on the volume, but the impact can be significant, with the significance depending in part on how the volume is used.

The link, above, goes on to explain how you can speed up the warm-up process with dd or fio. What the documentation omits is the fact that you can use either of these in a read-only mode with the volume mounted, and get the benefit of immediate availability while prepping the volume for action. This will have a further negative impact on initial random accesses, but the pain will end sooner than if you do nothing at all, and for that reason it is probably going to be your best choice... but you must put your DR scenario through its paces, observe its operation, and adjust your strategy, accordingly.

Related Topic