0

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?

2 Answers2

1

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.

Charlie
  • 21
  • 4
  • 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? – Javier Cintrón Jan 27 '22 at 01:11
  • 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. – Charlie Feb 08 '22 at 12:36
0

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.

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45