Understanding Block Storage in Amazon Web Services
When running workloads in the Public Cloud such as Amazon Web Services, you have a bunch of options when it comes to block storage. How do you know which one to pick? There are alot of choices–tradeoffs, features and sprawl can also occur. In this blog I will cover the different types of disks available to help educate you on some of the purposes and limitations of each. I previously covered what this looks like in Microsoft Azure and figured now would be a good time to cover the differences in AWS.
AWS Block Storage Options
The AWS Storage platform includes the following types of EBS Volumes:
- HDD-based
- Throughput Optimized (st1)
- Cold (sc1)
- SSD-based
- General Purpose (gp2, gp3)
- Provisioned IOPS (io1, io2, io2 Block Express)
In the following sections we will dive into the different types and discss the features, performance and cost of each.
Considerations
Similar to what I covered in Azure, there are many considerations when choosing a disk in the cloud. Do you need specific features? Do you need Performance? Do you need Cost Efficency? Do you need Availability/Durability?
Usually when I speak to customers running workloads, cost may be the biggest factor so we start with gp2. However then performance comes up so we review the disk options there was well. Are we looking at gp3 or io1? Next up is durability, do we make a second copy and store it into another availability zone? or do we look at io2 for the performance and durability combined. All of these options are valid for making sure you are choosing the right volume type for the job.
When it comes to features Amazon does have some benefits. Elastic Volumes provides the ability to resize volumes online without needing to stop the instance. When it comes to backup/snapshots this is compatible with all EBS storage types which is a nice benefit. EBS encryption is also available for all EBS volume types whether they are boot volumes, data volumes or snapshots. Last but not least if you are looking for EBS Multi-Attach this is only available for io1 or io2 volumes that are using a Nitro-Based instance.
Types of EBS Volumes
There are many types of EBS Volumes, this section will cover the Use Cases, Performance, Durability and Cost for each.
st1
st1 disk is a hdd backed storage that is ideal for frequently accesssed throughput intenstive workloads with large datasets and large I/O sizes. These volumes deliver performance, measured in MB/s of throughput, and include the ability to burst up to 250 MB/s per TB, with a baseline throughput of 40 MB/s per TB and a maximum throughput of 500 MB/s per volume. st1 is designed to deliver the expected throughput performance 99% of the time. Like most EBS volumes these have a durability of 2-3 nines.
Feature | Description |
---|---|
Volume Type | Throughput Optimized HDD (st1) |
Short Description | Low cost HDD volume designed for frequently accessed, throughput-intensive workloads |
Use Cases | Big data, data warehouses, log processing |
API Name | st1 |
Volume Size | 125 GB – 16 TB |
Durability | 99.8% - 99.9% durability |
Max IOPS/Volume | 500 |
Max Throughput/Volume | 500 MB/s |
Max IOPS/Instance | 260,000 |
Max Throughput/Instance | 7,500 MB/s |
Price | $0.045/GB-month |
Dominant Performance Attribute | MB/s |
sc1
sc1 is a hdd backed volume type that provides the lowest cost per GB of all EBS volume types. It is ideal for less frequently accessed workloads with large, cold datasets. These volumes can burst up to 80 MB/s per TB, with a baseline throughput of 12 MB/s per TB and a maximum throughput of 250 MB/s per volume. For infrequently accessed data, sc1 provides extremely inexpensive storage. Like most EBS volumes these have a durability of 2-3 nines.
Feature | Description |
---|---|
Volume Type | Cold HDD (sc1) |
Short Description | Lowest cost HDD volume designed for less frequently accessed workloads |
Use Cases | Colder data requiring fewer scans per day |
API Name | sc1 |
Volume Size | 125 GB – 16 TB |
Durability | 99.8% - 99.9% durability |
Max IOPS/Volume | 250 |
Max Throughput/Volume | 250 MB/s |
Max IOPS/Instance | 260,000 |
Max Throughput/Instance | 7,500 MB/s |
Price | $0.015/GB-month |
Dominant Performance Attribute | MB/s |
gp2
gp2 is a default volume type for Amazon EC2 instances. These are backed by SSD’s and are used for most workloads. While these are cost effective, you need to consider performance characterists and durability. With gp2 volumes capacity comes with performance, so until you hit ~1 TB you cannot get the highest level of performance (16,000 IOPS or 7500 MB/s of throughput). They also by default have 2-3 nines of durability so if using for production data AWS recommends a second copy of your data. So if you need a 100GB volume at 16,000 IOPS and then highly available you would need to provision 2TB of storage. This is when you may evaluate a different type of EBS volume.
Feature | Description |
---|---|
Volume Type | EBS General Purpose SSD (gp2)1 |
Short Description | General Purpose SSD volume that balances price performance for a wide variety of transactional workloads |
Use Cases | Boot volumes, low-latency interactive apps, dev & test |
API Name | gp2 |
Volume Size | 1 GB – 16 TB |
Durability | 99.8% - 99.9% durability |
Max IOPS2/Volume | 16,000 |
Max Throughput3/Volume | 250 MB/s |
Max IOPS/Instance | 260,000 |
Max Throughput/Instance | 7,500 MB/s |
Latency | single digit millisecond |
Price | $0.10/GB-month |
Dominant Performance Attribute | IOPS |
gp2 Performance per GiB is listed in the below table
Volume size (GiB) | Baseline performance (IOPS) | Burst duration when driving sustained 3,000 IOPS (second) | Seconds to fill empty credit balance when driving no IO |
---|---|---|---|
1 | 100 | 1,802 | 54,000 |
100 | 300 | 2,000 | 18,000 |
250 | 750 | 2,400 | 7,200 |
334 (Min. size for max throughput) | 1,002 | 2,703 | 5,389 |
500 | 1,500 | 3,600 | 3,600 |
750 | 2,250 | 7,200 | 2,400 |
1,000 | 3,000 | N/A4 | N/A4 |
5,334 (Min. size for max IOPS) | 16,000 | N/A4 | N/A4 |
16,384 (16 TiB, max volume size) | 16,000 | N/A4 | N/A4 |
gp3
gp3 is the latest version of the general purpose SSD. gp3 allows you to provision performance independent of storage capacity. The benefits of gp3 are they they start at 3,000 iops and 125 Mibps at any volume size and can scale indepently of capacity at a lower price point. While these still have the same durability as gp2 (2-3 nines) you have a better performance profile to use. It is also recommended that when using gp3 volumes to use an EBS-optimized EC2 instance.
Feature | Description |
---|---|
Volume Type | EBS General Purpose SSD (gp3) |
Short Description | General Purpose SSD volume that balances price performance for a wide variety of transactional workloads |
Use Cases | virtual desktops, medium sized single instance databases such as MSFT SQL Server and Oracle DB, low-latency interactive apps, dev & test, boot |
API Name | gp3 |
Volume Size | 1 GB – 16 TB |
Durability | 99.8% - 99.9% durability |
Max IOPS/Volume | 16,000 |
Max Throughput3/Volume | 1000 MB/s |
Max IOPS/Instance | 260,000 |
Max Throughput/Instance | 7,500 MB/s |
Latency | single digit millisecond |
Storage Price | $0.08/GB-month |
Provisioned Performance Price | 3,000 IOPS free and $0.005/provisioned IOPS-month over 3,000 IOPS; 125 MB/s free and $0.04/provisioned MB/s-month over 125 MiBps |
Dominant Performance Attribute | $/IOPS |
io1
io1 is a ssd backed storage that provides high performance volumes designed for critical, i/o intensive database and application workloads. These volumes are ideal for both IOP and Throughput intensive workloads that require low latency and have leniency for durability or are used in an application that has built-in redundancy. The reason for this is they still have the 2-3 nines of durability.
io1 is designed to provide up to 50 IOPS/GB to a maximum of 64000 iops and up to 1,000 MB/s of throughput per volume. To achieve the maximum performance, you must used an EC2 instance that is built on the AWS Nitro System.
Feature | Description |
---|---|
Volume Type | EBS Provisioned IOPS SSD (io1) |
Short Description | High performance SSD volume designed for latency-sensitive transactional workloads |
Use Cases | I/O-intensive NoSQL & relational databases |
API Name | io1 |
Volume Size | 4 GB – 16 TB |
Durability | 99.8% - 99.9% |
Max IOPS2/Volume | 64,000 |
Max Throughput3/Volume | 1,000 MB/s |
Max IOPS/Instance | 260,000 |
Max IOPS/GB | 50 IOPS/GB |
Max Throughput/Instance | 7,500 MB/s |
Latency | single digit millisecond |
Price | $0.125/GB-month + $0.065/provisioned IOPS-month |
Dominant Performance Attribute | IOPS |
io2
io2 is the next-generation provisioned IOPS SSD that is designed to provide 100X durability (5 nines) and 10x higher IOPS for every provisioned GB. This occurs at the same price as the previous generation (io1) but may not be available in all regions and availbility zones today. io2 is a high performance EBS storage option designed for business-critical, I/O intensive database applications, such as SAP HANA, Oracle, Microsoft SQL Server, and IBM DB2 that have high durability requirements.
io2 is designed to deliver a consistent baseline performance of up to 500 IOPS/GB to a maximum of 64,000 IOPS. io2 volumes also provide up to 1,000 MB/s of throughput per volume. To maximize the benefit of io2, we recommend using EBS-optimized EC2 instances.
Feature | Description |
---|---|
Volume Type | EBS Provisioned IOPS SSD (io2) |
Short Description | High performance SSD volume designed for business-critical latency-sensitive applications |
Use Cases | I/O-intensive NoSQL & relational databases |
API Name | io2 |
Volume Size | 4 GB – 16 TB |
Durability | 99.999% |
Max IOPS2/Volume | 64,000 |
Max Throughput3/Volume | 1,000 MB/s |
Max IOPS/Instance | 160,000 |
Max IOPS/GB | 500 IOPS/GB |
Max Throughput/Instance | 4,750 MB/s |
Latency | single digit millisecond |
Price | $0.125/GB-month, $0.065/provisioned IOPS-month up to 32,000 IOPS, $0.046/provisioned IOPS-month from 32,001 to 64,000 IOPS |
Dominant Performance Attribute | IOPS and volume durability |
io2 Block Express
Last but not least io2 Block Express is the latest generation and highest performing storage in the cloud with 4x higher throughput, IOPS and capacity than io2 volumes with sub-millisecond latency. io2 Block Express is designed to provide 4,000 MB/s throughput per volume, 256,000 IOPS/volume, up to 64 TiB storage capacity, and 1,000 IOPS/GB as well as 99.999% durability making it ideal for your largest, most I/O intensive, mission-critical deployments of Oracle, SAP HANA, Microsoft SQL Server, and SAS Analytics.
It is important to know that io2 Block Express is available with X2idn, X2 iedn and R5b instances, with support for other EC2 instances coming soon. All io2 volumes attached to R5b instances are on io2 Block Express. This disk is also the most costly as the instances required also incur an additional cost.
Feature | Description |
---|---|
Volume Type | EBS Provisioned IOPS SSD (io2 Block Express) |
Short Description | High performance SSD volume designed for business-critical latency-sensitive applications |
Use Cases | I/O-intensive NoSQL & relational databases |
API Name | io2 |
Volume Size | 4 GB – 64 TB |
Durability | 99.999% |
Latency | sub-millisecond |
Max IOPS/Volume | 256,000 |
Max Throughput3/Volume | 4,000 MB/s |
Max IOPS/Instance | 260,000 |
Max IOPS/GB | 1,000 IOPS/GB |
Max Throughput/Instance | 7,500 MB/s |
Price | $0.125/GB-month, $0.065/provisioned IOPS-month up to 32,000 IOPS, $0.046/provisioned IOPS-month from 32,001 to 64,000 IOPS, $0.032/provisioned IOPS-month for greater than 64,000 IOPS |
Dominant Performance Attribute | IOPS, throughput, latency, capacity, and volume durability |
Conclusion
Public Cloud Storage does provide you many options and flexibility, but with that comes many options, tradeoffs and sprawl. Do you need Performance? What happens if you want it to be cost effecient? Some of these decisions can sometimes be hard to make and ultimately you need to limit yourself in this area. There are products out there that can help with this–however, I will keep that topic for a future post.