AWS Certified SysOps Administrator - Associate: Resolving I/O Latency for Volumes Restored from Snapshots

Resolving I/O Latency for Volumes Restored from Snapshots

Question

You've just restored a volume from a snapshot and attached it to an EC2 Instance.

This Instance hosts an application that is going to make use of the new EBS volume.

You noticed some initial I/O latency when the application was first launched.

How can you ensure that subsequent volumes created from the same snapshot don't face the similar issue?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: D.

The AWS Documentation mentions the following.

New EBS volumes receive their maximum performance when available and do not require initialization (formerly known as pre-warming)

However, storage blocks on volumes 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.

For most applications, amortizing this cost over the lifetime of the volume is acceptable.

Performance is restored after the data is accessed once.

You can avoid this performance hit in a production environment by reading from all of the blocks on your volume before using it.

This process is called initialization.

For a new volume created from a snapshot, you should read all the blocks with data before using the volume.

Options A and B are incorrect because this does not depend on the underlying volume type.

Option C is incorrect since they need to anyway be in the same availability zone.

For more information on initializing volumes, please refer to the below URL-

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

When a volume is restored from a snapshot, the initial I/O latency can be observed because the restored volume has to fetch all data blocks that were not included in the snapshot. This can cause slow performance for applications that are making use of the volume. To avoid this issue for subsequent volumes created from the same snapshot, the following options can be considered:

A. Ensure that the volume being created is of the volume type Provisioned IOPS: Provisioned IOPS (input/output operations per second) is a type of Amazon EBS volume designed to deliver predictable, high performance for I/O intensive workloads. Provisioned IOPS volumes are designed to perform best with database workloads that require sustained I/O throughput, input/output operations per second (IOPS), and consistent low-latency performance. If the application is I/O intensive, this may be the best option to prevent I/O latency.

B. Ensure that the volume being created is of the volume type General Purpose SS: General Purpose SSD (solid-state drive) is a type of Amazon EBS volume designed to balance price and performance for a wide variety of workloads. It delivers a consistent baseline of 3 IOPS per gigabyte, and up to a maximum of 10,000 IOPS per volume. General Purpose SSD is a good choice for most workloads and is cost-effective. If the application does not require high I/O throughput, this may be a good option.

C. Ensure that the volume is created in the same availability zone as the snapshot: Amazon EBS volumes are designed for use with Amazon EC2 instances that are in the same availability zone. If the volume is created in a different availability zone, it may result in increased latency and reduced performance. Therefore, it is recommended to create the volume in the same availability zone as the snapshot.

D. Ensure that all blocks on the volume are accessed at least once: When a volume is restored from a snapshot, all blocks are not immediately loaded. Blocks are loaded on an as-needed basis. To prevent I/O latency, it is recommended to access all blocks on the volume at least once after the volume is created. This can be achieved by reading all the blocks sequentially.

In conclusion, to ensure that subsequent volumes created from the same snapshot don't face similar I/O latency issues, one or more of the above options can be considered depending on the workload requirements.