amazon-web-servicesamazon-ec2amazon-ebs

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


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.

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.


Solution

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

    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: