Disk iops vs latency

jp flag

I am trying to understand the diference between iops and latency, this is my question:

If an hypothetical disk had 2 io per second, then its latency would be 0.5 seconds?

za flag

If you mean fully loaded disk and it shows at best 2 iops, we can say average latency is 0.5 seconds.

If you were analyzing some performance data of a running system which shows that during some stretch of the time the disk handled 2 iops, it is not so easy. Disk might be completing its I/O quickly (with low latency) and then sitting idle the rest of the time because there are no requests to serve. If there were more I/O load, it might have been shown more iops. The only thing we can say in this case is that its average latency is at most 0.5 seconds.

in flag

IOPS isn't latency.

IOPS is the number of operations per second; as the number of IOPS requested from the device increases the latency will increase.

Imagine your disk is 2 IOPS. If you send 2 requests simultaneously, this will average 1 second to complete. If you send 20 requests near simultaneously, this will take ten seconds to complete, so any extra requests will have a latency of 10 seconds, because they are waiting for the others to complete.

Simplified, but a good example.

jp flag
So, the latency depends on the size of the queue? If queue's size is zero, latency per iop is 0.5 seconds, if queue's size > 0, latency = 0.5 + 0.5*queueSize?
in flag
As the queue grows yes you will more latency as the server can only do so many requests per second. You will have some latency anyway even with no requests in the queue.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.