DL1
January 22, 2015, 9:49am
1
Hi all,
I encounter a problem about measuring the R/W performance of USB disk,
my win32 program use below method to test the speed of USB disk,
Start = GetTickCount();
CopyFileEx(“C\:file.dat”, UsbDiskDrive, NULL, NULL, FALSE, COPY_FILE_NO_BUFFERING);
End = GetTickCount();
the formula to calculate the speed in MBs is.
FileSize / (End-Start*1000);
but the result seems not very correct with other Testing tool like ‘CrystalDiskMark3.0’,
can anyone give me some direction of such issue?
Thanks in advanced.
How exactly the line to calculate speed look in your code? Copy and paste to the message.
xxxxx@hotmail.com wrote:
I encounter a problem about measuring the R/W performance of USB disk,
my win32 program use below method to test the speed of USB disk,
Start = GetTickCount();
CopyFileEx(“C\:file.dat”, UsbDiskDrive, NULL, NULL, FALSE, COPY_FILE_NO_BUFFERING);
End = GetTickCount();
the formula to calculate the speed in MBs is.
FileSize / (End-Start*1000);
I assume you realize that you need more parentheses in that expression.
but the result seems not very correct with other Testing tool like ‘CrystalDiskMark3.0’,
can anyone give me some direction of such issue?
GetTickCount only updates at scheduler intervals, every 16ms. If your
test is taking less than a second or so, that’s just not enough precision.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
DL1
January 22, 2015, 8:13pm
4
Tim, Alex, thank you.
to alex, I will post the code later.
to Tim, I know the exactly expression need more parentheses.
the test result of write speed using my program looks OK, it usually would be 15MBs ~ 100MBs depend on different USB 3.0 disk.
but the test result of read speed was very tricky, it would be very different on different PC, sometimes may be 700MBs ~ 1500MBs, sometimes only 2~4MBs, the gap is too large, the normal value of read speed should be 100MBs~250MBs depend on the quality of USB 3.0 disk.
I wonder if it is the IO buffering issue.
Thanks.