IOPS vs Throughput. Which one to use while choosing AWS EBS
Asked Answered
L

2

38

While choosing a proper EBS volume type I need to decide if IOPS or throughput is a better performance measure.
The problem is that I don't fully understand in which practical scenario each of them is better than another.
This doc says "frequent read/write operations with small I/O size" is perfect for IOPS.

  • But what about frequent operations with high I/O size?
  • Not frequent operations with high I/O size?
  • Not frequent operations with small I/O size?

Why isn't throughput a perfect measure for "frequent read/write operations with small I/O size"?

I couldn't find answers in this and this questions.

Larios answered 4/12, 2019 at 18:15 Comment(0)
S
163

Let's try to explain what Throughput and I/O are.

  • I/O is the number of accesses to the disk. Each time you need to read a file, you need "at least" to access the file once. However the content is read in "chunks". Each time you read a "chunk", a new I/O is requested. Imagine biting a chocolate bar. You need to access the bar at least once, and you start biting (I/O) until you finish it. Each bite is an I/O. You need several I/Os to swallow the whole bar.

  • IOPS is I/O per second. Speed. So basically how fast we can perform each bite of the chocolate bar. An IOPS EBS is a volume specialized in performing fast biting: Ñam-Ñam-Ñam vs Ñam------Ñam-----Ñam

  • Throughput is the amount of info you read in each I/O. Continuing with the example, you can eat the whole chocolate bar in two different ways: small bites (small throughput) or big bites (big throughput), depending on your mouth size. Throughput EBS volume is specialized in performing big biting: Ñam vs Ñaaaaaaaam

Are I/O and Throughput related? Sure. If you have to read a big file from EBS, and your throughput is small (aka, your mouth is small so your bites are small) then you need to access (I/O) more frequently until the file is completely read. Ñam-Ñam-Ñam-Ñam

On the other hand, if you have a big mouth (big throughput), then you will need less bites and less I/O. Ñaaaam---Ñaaaam

So in some ways they could balance each other, but....there are corner cases:

a) Imagine you have a 1 really tiny tiny tiny small file (or chocolate nano-bar). --- In this case, even the smallest mouth is enough. With a big or a small mouth you are able to eat the whole nano-bar with just 1 bite.

b) Imagine you have a bucket of zillions of tiny tiny small files ( or chocolate nano-bars) --- In this case, even the smallest mouth is enough to swallow each bar. Big or small throughput won't give you a better performance. However having an IOPS (I/O per second) will boost your performance. A Throughput EBS Volume will perform much much worse than an IOPS Volume.

c) Imagine you have a bucket of zillions of big files. --- So you need Throughput for big files and you need IOPS for multiple access. Then probably you should go towards a EBS General Purpose (it has bursting)

With that you should be able to craft an answer, but for me:

But what about frequent operations with high I/O size? --> EBS General Purpose. Here the "high" and "frequent" ask for a balanced volume.

Infrequent operations with high I/O size? --> EBS Throughput. You need the biggest mouth possible.

Infrequent operations with small I/O size?--> Warning! What is "small" size for you? If they are small for real, then I would probably go towards IOPS becase a big/small mouth (Throughput) will not make a big difference. And in case those "not frequent" becoming a "frequent" (more users?more complexity?) will benefit from the IOPS. Probably you can then also survive with an EBS General Purpose. However, second warning, what does "not frequent operations" mean? Do you mean those files are not frequently accessed? In such case, you should check for a Cold HDD

As always, recommendations, are just recomendations...and the best (because you can get surprised about your sense of "small") is to test performance in cases where you have doubts.

Use cases:

  • Work loads -> usually General Purpose Volume
  • Databases -> usually IOPS (small data but frequently retrieved)
  • Big Data / Data warehouses -> usually Throughput ( big data files)
  • Cold HDD -> Cold File Servers (lowest IOPS before moving to Magnetic)
Sidelong answered 14/5, 2020 at 10:52 Comment(6)
This comment is for better than any other over the internet or other questions.Likelihood
I was really struggling to understand the difference between IOPS and throughput, thanks for your clear answer!Simmon
Thank you Victor, now I am more knowledgeable and hungryPigeontoed
This summary should be the introduction to AWS' EBS documentation.Kalat
I just like this explanation. Level of deep understanding while explaining any concept is pretty much required and Victor Martinez did a great job here.Dobbins
Great answer overall but this upvote is specifically for Ñam vs Ñaaaaaaaam.Chrysotile
E
5

(Just to supplement Victor's great answer) From the AWS Fundamentals Core Concepts doc, the performance characteristics for different storage services regarding to latency, throughput, and IOPS are as below.

If you are using a block storage service (Amazon EBS):

  • Latency is affected by the selection of the volume type (e.g., solid-state drive vs. hard disk drive).
  • Throughput and IOPS capacity are proportional to volume size for most volume types.

If you are using a file system service (Amazon EFS and the Amazon FSx family)

  • Latency and IOPS are affected by your choice of performance modes.
  • Throughput is affected by your choice of using provisioned throughput.

If you are using an object store (Amazon S3)

  • Latency is affected by the geographic distance to the bucket endpoint
  • Throughput is affected by the use of throughput-optimized APIs such as multipart upload
  • IOPS is not configurable

If you are using an archival store

  • Latency is affected by the geographic distance to the bucket endpoint and choice of retrieval method
  • Throughput is affected by the use of throughput-optimized APIs such as multipart upload
  • IOPS is not configurable
Enlarge answered 20/2, 2022 at 5:40 Comment(2)
Link seems broken, now lands on Getting Started Guide for cloud computingDistrust
@BrettBim I cannot find a new AWS doc link that is related to my answer, it seems that AWS completely deleted the related web page. U can search for the exact keywords/sentences in the source code of the old website stored in the [Internet Archive](view-source:web.archive.org/web/20220301204537/https://aws.amazon.com/…) (just right click anywhere on the old web page and click "View Page Source"). For example u can search for the line "If you are using a block storage service".Enlarge

© 2022 - 2024 — McMap. All rights reserved.