Question :
I’ve searched the web for a little while and haven’t found an answer I’m confortable with. I am testing a SQL Server on a VM that was presented new disc.
If disk latency is reduced, shouldn’t throughput increase? Is there a direct correlation between disk latency and throughtput? Seems like if I have faster disk I should see an increase in throughput.
Answer :
It might help to define terms up-front.
The term latency is used in (at least) two ways regarding I/O. It can mean:
- The average time it takes to service an I/O at any given time. That’s how Paul Randal is using it in “How to examine IO subsystem latencies from within SQL Server” and it can be measured using (for example) Performance Monitor with counters such as “Avg. Disk sec/Read”. I’m going to call this the ‘measured’ latency, and it is related (inversely) to the queue length at a given time, but is a much more helpful measure because it is easy to relate to actual performance from a user perspective.
- The average time a single I/O takes in isolation. That’s how it is typically used on spec sheets for HDDs and SSDs like this one from Seagate. I’ll call this the ‘inherent’ latency (it’s also sometimes called ‘access time‘).
Throughput can also mean different things in different contexts:
- The maximum rate of sequential data transfer, typically measured in MB/sec
- The maximum rate of I/O operations typically measured in IOPS
- The current rate of data transfer such as that measured using Performance Monitor with counters such as “Disk Bytes/sec”
Seems like if I have faster disk I should see an increase in throughput.
Because of the way you phrase this, I think you are specifically talking about the quoted MB/sec and ‘inherent’ latency for disk drives. If that’s the case then the answer is “no, there is no direct correlation between disk latency and throughput”. Latency for a HDD is affected by the seek time and the spin speed, but it only applies to the first read: subsequent sequential reads do not have the same latency. The mechanics are different for SSDs, but they can still be tuned by the manufacturer for high ‘throughput’ or high IOPS with issues like block size being important.