Performance and cost · 13 min
Amazon EBS and Amazon EFS performance
In this lesson you will learn the difference between IOPS and throughput, which Amazon EBS volume type fits each workload, how to change a volume without stopping the instance and how to choose the Amazon EFS performance and throughput modes.
An Amazon EBS volume is a virtual disk that attaches to an EC2 instance, and Amazon EFS is a shared folder that several instances use at once. The SAA-C03 exam assumes that a database on EC2 stores its data in Amazon EBS, and what it asks is which volume type to use. To answer those questions you need to separate two disk measures, which are IOPS and throughput, and know which volume type is built for each one. For example, an online store needs a fast disk for its orders database and a cheap one to keep old records, and they aren't the same volume type.
IOPS and throughput
IOPS are the read or write operations the disk performs per second, no matter how large they are. Throughput, on the other hand, is the amount of data the disk moves per second, and it is measured in MiB/s. For example, saving a thousand small orders is a thousand operations that move little data, while copying a single movie is one long operation that moves a lot of data.
Each workload depends more on one of the two measures. A transactional database, like the store's orders database, performs many small operations, so IOPS matter to it. A job that reviews logs or a data warehouse, on the other hand, reads large files sequentially, so throughput matters to it.
Amazon EBS SSD volumes

EBS has two families of disks. SSDs store data on chips, like a phone's memory, and find any piece of data almost instantly. HDDs store data on spinning disks, and they are cheaper but take longer to jump from one piece of data to another. That is why EBS SSD volumes are built for small, frequent operations, where IOPS count. There are three types you need to tell apart:
- gp3 (General Purpose SSD), which is the cheapest SSD and the one the console chooses by default when you create a volume.
- gp2, which is the previous generation of gp3 and whose performance grows with the size of the volume.
- io2 Block Express (Provisioned IOPS SSD), which is for the workloads that gp3 isn't enough for.
A gp3 volume comes with a baseline of 3,000 IOPS and 125 MiB/s included in the price, regardless of its size, which ranges from 1 GiB to 64 TiB. If you need more, you pay for it separately, up to 80,000 IOPS (500 per GiB) and 2,000 MiB/s. Also, gp3 doesn't use bursts, which are short increases in speed, so it sustains what you provision all the time. For example, if the store's orders database needs 4,000 IOPS, it pays only for the 1,000 above the baseline.
A gp2 volume, for its part, delivers 3 IOPS per GiB, and volumes smaller than 1 TiB use credits, which build up while the disk does little work, to burst up to 3,000 IOPS. That is why a gp2 volume only reaches the 3,000 IOPS that gp3 always includes if it is large or if it uses burst credits, and gp3 also costs up to 20% less than gp2. For example, a small gp2 volume can be fast for a while and then become slow when it runs out of credits.
An io2 Block Express volume reaches 256,000 IOPS (1,000 per GiB) and 4,000 MiB/s, with an average latency under 500 microseconds. It also has 99.999% durability, compared with 99.8% to 99.9% for the other types. AWS recommends it for workloads that need sustained IOPS or more than 80,000 IOPS or 2,000 MiB/s. For example, a bank with a database that processes payments nonstop all day uses io2 Block Express.
Amazon EBS HDD volumes
EBS HDD volumes are built for large, sequential reads, that is, reads of data in a row, one after another, where throughput counts. There are two types:
- st1 (Throughput Optimized HDD), which is for big data, which are huge sets of data, data warehouses and log processing, and which reaches 500 MiB/s.
- sc1 (Cold HDD), which is for data that is read infrequently when what matters is the lowest cost, and which reaches 250 MiB/s.
Both HDD types range from 125 GiB to 16 TiB, and neither of them can be a boot volume. That is why an EBS boot volume is always an SSD. For example, the store can review the day's logs on an st1 and keep on an sc1 the logs from past years that almost nobody opens.
Which EBS volume type?
0 of 5Tap the column of the volume that fits each case.
The boot volume of a web server
An Oracle database that needs 150,000 sustained IOPS
A cluster that processes large logs sequentially every day
Historical data that is read a couple of times a year and must cost as little as possible
A medium-sized single-instance database with 6,000 IOPS
Changing a volume without stopping the instance
Elastic Volumes changes the type, IOPS and throughput of a volume without interrupting the instance. With this feature you migrate from gp2 to gp3 while the instance keeps running, and you end up with the same performance or better for less money. For example, the store can move its database disk from gp2 to gp3 in the middle of the afternoon without closing the store.
An EBS volume lives in one zone

An EBS volume exists in a single Availability Zone, and that limits which instances it can be attached to. A volume in zone A, for example, can't be attached to an instance in zone B. EBS copies the data within its zone, and to take it to another zone you create a snapshot. That is why an EBS volume doesn't work for a group of instances spread across several zones.
Within the same zone, io1 and io2 volumes support Multi-Attach, which is attaching to several instances at once. gp3 and gp2 volumes and the HDD volumes don't support it. For example, if the store wants its servers in two zones to see the same files, it needs EFS and not an EBS volume.
Amazon EFS performance and throughput modes
In Amazon EFS you don't choose IOPS, but two modes: the performance mode and the throughput mode. The performance mode can be General Purpose or Max I/O, and AWS recommends General Purpose. Max I/O is from the previous generation, has higher per-operation latency and doesn't work with One Zone file systems, which store data in a single zone, or with Elastic throughput. For example, the store's shared images folder is created with General Purpose.
cloud path tip: if an option suggests Max I/O to make EFS faster, remember that AWS recommends General Purpose and that Max I/O adds per-operation latency.

The throughput mode has three options:
- Elastic, which is the default and the recommended one, scales on its own and is used for spiky or hard-to-predict workloads, or when the average is 5% or less of the peak, and where you pay for the data you read and write.
- Provisioned, where you set the throughput regardless of how much data you store, and which is used when you know how much the workload needs or when the average is more than 5% of the peak.
- Bursting, where throughput grows with what you store, and which AWS recommends changing to Elastic or Provisioned if the application runs out of credits or uses more than 80% of the permitted throughput.
For example, if the store's images are barely read during the day but all of them are processed at once during a special sale, Elastic raises the throughput only for that peak and charges for what was read.
Which throughput mode?
An EFS file system stores 200 GB. The application uses it lightly most of the day, but at month-end it reads everything in a few hours. With Bursting it runs out of credits on those nights. What do you change?
EFS storage classes
Besides performance, EFS lowers the cost by moving files that aren't used to cheaper classes, with lifecycle management, a rule that moves files based on how long they have gone without being opened. By default, a file nobody reads in 30 days moves to Infrequent Access, designed for data used a few times per quarter, and one nobody reads in 90 days moves to Archive, for data used a few times a year or less.
When someone reads a file that has already been moved, by default the file doesn't go back to Standard. However, you can configure it to go back on first access. For example, the photos of products the store no longer sells move to Archive on their own, and if someone opens one some day, it stays in Archive unless you configured it to go back.
If your account uses the new experience
In a new experience account, EBS and EFS are in the free plan. If you try Elastic Volumes, the IOPS and throughput you request above the baseline are charged separately. For example, changing a practice gp2 volume to gp3 with the baseline of 3,000 IOPS doesn't add that charge, but asking it for more IOPS does.
On the exam
The questions on this topic describe the workload and ask you for the volume type. These words in the question point to the answer:
- "More than 80,000 IOPS", "sub-millisecond latency" or "sustained IOPS", which point to io2 Block Express.
- "Lowest cost" together with "SSD" or "migrate from gp2", which point to gp3.
- "Sequential", "big data", "logs" or "data warehouse", which point to st1.
- "Rarely" together with "the lowest cost", which point to sc1.
For example, if the question says "data that is queried once a year and has to cost as little as possible on an EBS volume", the answer is sc1.
Review question
An application runs on an EC2 instance with a 2 TiB gp2 volume that delivers 6,000 IOPS. The company wants to pay less without losing performance and without stopping the instance. What do you do?
Next
- Choosing an AWS storage service, the AWS decision guide. Its "Performance" section has the gp3 limits.
- Take a Solutions Architect practice exam at /examenes.