Disk IO Monitor
- a fairly simple utility that samples and displays, in real-time, read/write rates of a physical drive.
Read activity is on the top, write activity is at the bottom.
What's interesting about this graph is that it can display samples as large as
and still clearly show
differences between them.
To that end, it spreads each sample across several horizontal bands, each displaying a count of
GBs, MBs and KBs, plus "leftover" bytes in each sample.
If we want to display, say,
, then it's
bytes, so the band closest to the zero line shows a bar filled to 445/1024, the next band - 792/1024 and the 3rd - 11/1024.
This is basically a
factorization of a sample value.
It is also a discrete (rather than continuous) variation of a
, which is very commonly used for "squeezing" large values into more manageable ranges.
In practical terms this allows us to quickly see how different any two samples are, even if they are very large.
For example -
These two samples are both in the MB range, very close to each other, but looking at the KB band it's immediately obvious which one is larger and approximately by how much.
This sort of analysis is often needed when trying to spot
that is order of magnitude smaller than absolute sample values.
In our case, this need surfaces when analyzing the effects of OS file caching on bulk IO performance.
Here's a 16 GB file being copied using Windows Explorer:
Here's the same file being copied with a custom, somewhat better optimized code:
* Both tests are run with the file cache purged.
Windows Explorer makes uses synchronous IO that goes through the Windows File Cache. This delays writes and it also adds jitter to read operations.
In comparison, the second graph is for the code that uses asynchronous
-based copying engine that bypasses the OS cache. The resulting data flow is far more stable and predictable. It's also substantially faster.
Here's a dev build if you feel like seeing this thing in action:
~ 71KB, no dependencies. Just save somewhere and run.
It defaults to monitoring of the
drive, but another drive can be selected by clicking on "Disk C:". The sampling rate is
and it is fixed for now.
option will clear the so-called Windows Standby List, which effectively empties the OS file cache. Use with care, obviously.
Happy graphing :)