Elastic Block Storage – EBS

Elastic Block Storage – EBS provides durable block level storage volumes to EC2 instances. Unlike Instance Store volumes, EBS volume data is not for temporary storage. They are highly reliable and persist even after instance stops/terminates, reboots etc.

  •  EBS volumes can be attached to instances during the instance launch and also when the instance is running.
  • You can create an EBS volume and then attach it to any EC2 instance in the same Availability Zone.
  • The data on the EBS volumes persist independently of the lifecycle of the instance. That is, even if the instance is stopped or terminated the data in the EBS volume stays and can be accessed.
  • You can attach multiple EBS volumes to a single EC2 instance and you can use an EBS volume to boot an instance. However, an EBS volume can belong to only one EC2 instance at a time.
  • When EC2 instances are launched, you can specify EBS volumes to be created as encrypted volumes. Data stored on encrypted EBS volumes, disk I/O performed and snapshots taken are all encrypted.
  • We can take a point in time snapshots of EBS volumes, which get stored in Amazon S3. These snapshots can further be used to instantiate new volumes and copied across AWS Regions.
    • Note that EBS volumes that are restored from encrypted snapshots are encrypted by default.
    • Snapshots are incremental backups, which means that only the blocks on the device that have changed after your most recent snapshot are saved. Also when you delete a snapshot only the data that is unique to that snapshot gets deleted.
    • When you copy an unencrypted snapshot, you can encrypt it during the copy process. 
  • EBS volumes are specific to an Availability Zone and can be attached to any instance in that availability zone. However, you can take a snapshot of the EBS volume and restore it to any other availability zone in the region.
  • New EBS volumes do not require initialization (formerly known as pre-warming). They receive their maximum performance the moment they are available.
  • However, for those EBS volumes restored from snapshots (from S3 ) must be initialized. They are loaded lazily in the background. Which means when a volume is created from the snapshot, we don’t need to wait for all the data to transfer from S3 to the new EBS volume before your attached instance can start accessing the volume. If in case the instance tries to access the data which is not loaded, the volume immediately downloads the data from S3.
  • Remember that Amazon enforces instance volume limits that determine the number of volumes that can be attached to an instance. Also, encrypted volumes can only be attached to supported Amazon instances.
  • If you no longer need an EBS volume it can be deleted. However, you can take a snapshot and store in S3 before deleting the EBS volume. Once deleted, the volume can’t be attached to any instance.
  • Volume status checks are automated tests that run every 5 minutes and return a pass or fail status. If all checks pass, the status of the volume is OK. If a check fails, the status of the volume is Impaired. If the status is insufficient-data, the checks may still be in progress on the volume.
  • The below table gives a brief overview of various EBS metrics that are sent to cloud watch for monitoring –
MetricDescription
VolumeReadBytesProvides information on the read operations in a specified period of time.

Units: Bytes

VolumeWriteBytesProvides information on the write operations in a specified period of time.

Units: Bytes

VolumeReadOpsThe total number of read operations in a specified period of time.

To calculate the average read operations per second (read IOPS) for the period, divide the total read operations in the period by the number of seconds in that period.

Units: Count

VolumeWriteOpsThe total number of write operations in a specified period of time.

To calculate the average write operations per second (write IOPS) for the period, divide the total write operations in the period by the number of seconds in that period.

Units: Count

VolumeTotalReadTimeThe total number of seconds spent by all read operations that completed in a specified period of time. If multiple requests are submitted at the same time, this total could be greater than the length of the period. For example, for a period of 5 minutes (300 seconds): if 700 operations completed during that period, and each operation took 1 second, the value would be 700 seconds.

Units: Seconds

VolumeTotalWriteTimeThe total number of seconds spent by all write operations that completed in a specified period of time. If multiple requests are submitted at the same time, this total could be greater than the length of the period. For example, for a period of 5 minutes (300 seconds): if 700 operations completed during that period, and each operation took 1 second, the value would be 700 seconds.

Units: Seconds

VolumeIdleTimeThe total number of seconds in a specified period of time when no read or write operations were submitted.

Units: Seconds

VolumeQueueLengthThe number of read and write operation requests waiting to be completed in a specified period of time.

Units: Count

VolumeThroughputPercentageUsed with Provisioned IOPS SSD volumes only. The percentage of I/O operations per second (IOPS) delivered of the total IOPS provisioned for an Amazon EBS volume. 

During a write, if there are no other pending I/O requests in a minute, the metric value will be 100 percent. Also, a volume’s I/O performance may become degraded temporarily due to an action you have taken (for example, creating a snapshot of a volume during peak usage, running the volume on a non-EBS-optimized instance, or accessing data on the volume for the first time).

Units: Percent

VolumeConsumedReadWriteOpsUsed with Provisioned IOPS SSD volumes only. The total amount of read and write operations (normalized to 256K capacity units) consumed in a specified period of time.

I/O operations that are smaller than 256K each count as 1 consumed IOPS. I/O operations that are larger than 256K are counted in 256K capacity units. For example, a 1024K I/O would count as 4 consumed IOPS.

Units: Count

BurstBalanceUsed with General Purpose SSD (gp2), Throughput Optimized HDD (st1), and Cold HDD (sc1) volumes only. Provides information about the percentage of I/O credits (for gp2) or throughput credits (for st1 and sc1) remaining in the burst bucket. Data is reported to CloudWatch only when the volume is active. If the volume is not attached, no data is reported.

Units: Percent



Leave A Reply

Your email address will not be published. Required fields are marked *