AWS EBS using SSD vs HDD
Amazon Elastic Block Store, or AWS EBS provides durable block-level storage. AWS EBS is used with EC2 instances, connected as their disk storage volumes. What’s unique about AWS EBS is the underlying technologies that implements high availability and durability while also providing utility to self manage the storage devices by the cloud consumers.
Physically these storages are network attached and replicated in to multiple storage instances within the same availability zone to prevent loss from failures of any single component. You can attach multiple EBS volumes to a EC2 instance but the other way around is not possible. For more details, see this article on AWS EBS volume management.
To provide the benefits of cost reduction and economic of scale, AWS is transparently providing multiple storage options to the end user so that they can select the physical storage technology which is viable for different business use cases.
This article will describe several terminologies linked with AWS EBS which will help you to understand the basics in using AWS EBS for different application workloads.
Physical Disk Drives (SSD vs HDD)
Under the hood, AWS EBS uses two categories of physical disk drives. These are Solid State Drive (SSD) and Hard Disk Drives (HDD) drives which can be selected upon provisioning the EBS volume based on the use case.
You might think using SSDs the best option to improve performance which is also expensive compared to HDD. However though, SSDs are the latest types of hard disks, for certain use cases, HDD outperforms SSD hard disks. SSD backed storage is more suitable for workloads that are primary depend on Input Outputs per Second (IOPS). HDD backed storage are for throughput intensive workloads measured in Megabytes per Second (MBPS).
Note: If you are not quite sure which storage option to use with EBS, its recommended to use General Purpose SSD which is the default storage option.
There are sub categories of physical disks drives for SSD and HDD types of disk drives.
SSD (Random Access)
- Provisioned IOPS — Used for I/O-intensive Database Systems
- General Purpose — Boot volumes, Dev & Test Systems
HDD (Sequential Access)
- Throughput Optimized — Big data analysis, Data warehousing, Log processing
- Cold — Cold data which requires few scans per day
Throughput vs IOPS
You have probably used both Throughput and IOPS as measures of performance. However it is important to understand that they provides difference picture of performance. Throughput is about the data transfer speed. IOPS refers to the time taken for a storage system to perform an Input or Output operation per second from start to finish. Following two diagrams shows a comparison of Max IOPS per volume and Max throughput per volume for different physical disk categories used in EBS.
If you look at the Max IOPS per Volume, it is evident that the HDD performs less in terms of IOPS. This is simply because, they are naturally built for sequential access and the mechanical components in HDD needs to move mechanically from place to place for different reads or writes.
However for throughput, HDD performs better since it can read the data sequentially. Overall these diagrams clearly shows the important in selecting the right type of storage category based on the nature of your workload can affect the performance significantly while reducing the costs.
Expanding EBS Volumes
It’s essential to understand how to keep costs low while using EBS volumes. Since EBS volume costs involves provisioned storage size, it’s also important to keep the size minimal and expand when it’s necessary. Recently AWS introduced the support to dynamically expand the volumes. This allowed to expand the volume size for current-generation AWS EBS volumes attached to a current-generation EC2 instance types.
Compliance & Security
Different application workloads requires to be in compliance with the regulatory needs. AWS EBS provides support to data-at-rest and data-in-motion for additional security. It support not only for seamless encryption of both EBS boot volumes and data volumes, but also for snapshots used for backup and retrieval.
In addition provisioning and managing EBS volumes can be controlled with Amazon IAM access permission for fine grained access control. This allows not only to control access, but also with the support of Amazon Cloud Trail, you can log the API calls happens for EBS volumes.