gp2 Throughput Explained – EBS Volumes


Last Updated on January 13, 2021

I wanted to investigate if the statement of Amazon Web Services (AWS) that “gp3 is 20% cheaper than gp2” is always true. That is why I’m creating this series of post to investigate when can we say that gp3 is really cheaper than gp2.

I have already written about Throughput of Elastic Block Store (EBS) Volumes and Throughput of gp3 EBS Volume type.

In this post, I will be discussing the Throughput of gp2 Volumes.


What is the Throughput of gp2 Volumes?

A quick look in the AWS documentation, here are the details of gp2 Volumes.

Minimum Size1 GiB
Maximum Size16 TiB
Price*$0.10 per GB-month of provisioned storage
Maximum IOPS16,000 IOPS
Maximum Throughput250 MiB/s

price is based on N. Virginia Amazon Web Services (AWS) Region.

The table in the Solid State Drive (SSD) part of the documentation only said something about Maximum Througput, but it never really say anything about what is the real Throughput or what are the conditions that affect the Throughput of gp2 volumes.

To find out the real Throughput of gp2 EBS Volumes, we have to look at 2 places in the documentation.

  1. The paragraph just below the SSD Table.
  2. The Throughput subsection of General Purpose SSD volumes (gp2).

Bursting Throughput

Looking at the paragraph below the SSD Table, it only says about the maximum Throughput based on the size of the gp2 Volume. It also mentioned to achieve the maximum Throughput, Burst Credits should be available for the EBS Volume.

To easier understand the information, it is best to put it in a table.

SizeMaximum ThroughputCondition
1GiB to 170 GiB128 MiB/sBurst Credits available
171 GiB to 333 GiB250 MiB/sBurst Credits available
334 GiB to 16 TiB250 MiB/sRegardless of Burst Credits

Now that we know that the maximum Throughput is affected by Burst Credits, the next question that I tried to check is if the amount of Throughput used by our EC2 Instance has spend Burst Credits.

Does Amount of Throughput used affect Burst Credits?

The short answer to this is no.

As long as I have Burst Credits, I will be able to use the Maximum Throughput based on the conditions on the table above.

If you look at the documentation on how Burst Credits is accumulated and spent in a gp2 volume, you will never see Throughput being in the equation. Burst Credits is only affected by how much IOPS the EBS Volume is producing or using.

gp2 Burst Credits Bucket from AWS Documentation.

As much as I want to discuss IOPS and Burst Balance here, I will have to do it in another post since I want this article to only focus on gp2 Volume’s Throughput.

Now that we know that Throughput does not spend the Burst Balance, the next thing to seek is the Maximum Throughput when the Burst Credits are all spent.


Baseline Maximum Throughput when Burst Credits is empty

To know the Maximum Throughput when we there is no longer any Burst Credits, we will need to use our second reference, which is the GP2 Throughput Performance in the AWS Documentation.

If your gp2 volume uses all of its I/O credit balance, the maximum IOPS performance of the volume remains at the baseline IOPS performance level (the rate at which your volume earns credits) and the volume's maximum throughput is reduced to the baseline IOPS multiplied by the maximum I/O size

There is a lot of information in the quote above, so let’s try to define them one-by-one.

As discussed in the general EBS Volume Throughput post, the Maximum I/O Size per I/O for SSD Volumes is 256 KiB/IO.

Note: 1 MiB = 1024 KiB & 1 GiB = 1024 MiB

The Baseline IOPS is equal to the Size of the Volume (GiB) multiplied by the 3 IOPS/GiB. This can be seen in the AWS Documentation here.

Baseline IOPS = (Volume Size in GiB) * (3 IOPS/GiB)

Now that we know the Maximum I/O Size and the Baseline IOPS, we can now compute or the baseline Maximum Throughput when we no longer have Burst Credits.

Baseline Max. Throughput = (Baseline IOPS) * (Maximum I/O Size)

Baseline Max. Throughput = (Volume Size in GiB) * (3 IOPS/GiB)  * (256 KiB/IO)

Baseline Throughput of 1 GiB Volume

Now that we have a formula for Baseline Max. Throughput, we can now compute for its value when we have the smallest gp2 volume size we can provision, 1 GiB.

Baseline Max. Throughput = (1 GiB) * (3 IOPS/GiB) * (256 KiB/IO)

Baseline Max. Throughput = (3 IOPS) * (256 KiB/IO)

Baseline Max. Throughput = 768 KiB/s = 0.75 MiB/s

From the computation above, we can say that the Baseline Maximum Throughput of a 1 GiB gp2 Volume is 0.75 MiB/s.


Minimum Volume Size for Maximum Throughput

We know that the maximum Throughput for a gp2 Volume is 250 MiB/s, the question now is ‘What is the Volume Size where the 250 MiB/s Maximum Throughput of a gp2 Volume be equal to the Baseline Maximum Throughput?’

We can derive this by doing some algebra to our formula.

Baseline Max. Throughput = (Baseline IOPS) * (Maximum I/O Size)

Baseline Max. Throughput = (Volume Size in GiB) * (3 IOPS/GiB)  * (256 KiB/IO)

Where:
   Baseline Max. Throughput = 250 MiB/s

250 MiB/s = (Volume Size in GiB) * (3 IOPS/GiB) * (256 KiB/IO)

Volume Size in GiB = (250 MiB/s) / ((3 IOPS/GiB) * 256 KiB/IO))

Converting Units:
    250 MiB/s = 0.244140625 GiB/s

    256 KiB/IO = 0.25 MiB/IO = 0.000244140625 GiB/IO

Volume Size in GiB = (0.244140625 GiB/s) / ((3 IOPS/GiB) * 0.000244140625 GiB/IO))

Volume Size in GiB = 333.33 GiB

Since EBS Volume size can only be provisioned in whole GiB, then we will round up 333.33 GiB to 334 GiB.

Therefore, the minimum Volume Size for a baseline Maximum Throughput of 250 MiB/s is 334 GiB.

The 334 GiB size is also the lower limit for the Maximum Throughput of 250 MiB/s regardless if the gp2 volume has Burst Credits or not.

Here again is the Burst Credits Throughput table, so you do not have to scroll up.

SizeMaximum ThroughputCondition
1GiB to 170 GiB128 MiB/sBurst Credits available
171 GiB to 333 GiB250 MiB/sBurst Credits available
334 GiB to 16 TiB250 MiB/sRegardless of Burst Credits

Baseline and Bursting Throughput Chart

Here again is the formula for the Baseline Maximum Throughput without Burst Credits.

Baseline Max. Throughput = (Baseline IOPS) * (Maximum I/O Size)

Baseline Max. Throughput = (Volume Size in GiB) * (3 IOPS/GiB)  * (256 KiB/IO)

If you noticed that the only the Volume Size in GiB is a variable and the IOPS/GiB and Maximum I/O Size are just constant. We can conclude, that this equation is linear from 1 GiB to 334 GiB.

Below is a graph of Bursting and Baseline Maximum Throughput to understand its relationship better.

Note: From 334 GiB to 16 TiB, the Maximum Throughput is 250 MiB/s regardless if there is Burst Credits or not.


Now that I have covered all scenarios that I can think of for gp2 Throughput, I will end this post here.

I hope this has helped you understand the Throughput behavior of gp2 EBS Volumes.


Leave a Reply

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