The following report shows the performance (MegaBytes/Second) of various Input/Output interfaces (API's) on Windows 7. The following File Management interfaces are measured:
Windows 7/64 test run on HP dual quad-core 2.8GHz, with 1 TB Hitachi HDs721010KLA330 drive, measured average transfer rate of 69MB/s using HDTune.
The test is performed by first creating two 100 Megabyte files. One file is used to flush the OS file cache between each test. The flush is done by sequencially reading the entire file. Each test uses the specified i/o interfaces to read or write a specified record size buffer. The sequencial test runs across the entire 100MB file. The random test only touches 50% of the file. The random access test is shorten because I don't think the entire file needs to be randomly read to get the effective random access transfer rate. The time to run the test is measured as well as the total number of bytes procssed. The resuls are saved to a log file.
HDTune measured the average raw transfer rate of the disk drive at 69MB/sec, yet most of the test results exceed that rate. This difference reflects Windows's ability to buffer disk access to improve performance, most noticable in the Input tests.
The tests measure local disk and network file performance. The local disk tests both the default disk flush settings and with the flush disabled.
The first series of graphs shows the Input performance. The graphs include both Sequencial and Random file access results in one graph.
WINDOWS source code
In order to minimize file fragmentation impact, the test file is made by seeking to the allocation file position and then end-of-file is set. Using this file creation method produces a continguous file allocation most of the time. For refernce, the disk fragmentation is displayed when the tests is run.
Create a contiguous file:
HANDLE hFile = CreateFileA( filePath, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_FLAG_NO_BUFFERING, NULL); SetFilePointer(hFile, filePos.LowPart, &filePos.HighPart, FILE_BEGIN);
Summary of Input Results:
- All File interfaces have equal performance (average MB/s).
- The larger record size gives higher input performance (MB/s).
- Sequencial access peaks at ~120MB/s with disk flush enabled, and ~140MB/s with flush disabled.
- Random access peaks at ~80MB/s with disk flush enabled, and ~100MB/s with flush disabled.
Windows 7 Input File Performance with disk flush disabled
Windows 7 Input File Performance over a 100mb network
Summary of Output Results:
Windows 7 Output File Performance with disk flush disabled
Windows 7 Output File Performance over a 100mb network
The above graphs were produced by running fileio with the following options:
Local disk test:
fileio -Fc -k 100mb -z > localtest.csv
fileio -Fc -P \\host\dir\fileio.dat -k 100mb -z > remotetest.csv