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?
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?
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.
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.