I realized I didn't answer all your questions. Sorry about that. See
below:
What kind of benchmarking tool is it? For benchmarking raw disks, or
the OS FS, or what? It may be using methods that are simply unavailable to
a general purpose language like perl.
I do believe DT (which I mentioned in an earlier note) uses very basic,
sequential reads (there are certainly switches to do async and other
switches as well, but I just use the basics). If you do care to
download a copy of it (and I highly recommned it), try the command:
dt of=/tmp/file limit=10g bs=1m disable=compare,verify dispose=keep
to create a 10G file. As I said before, pick a size at least as large
as your current RAM to assume it doesn't get cached. Now read it back
with the identical command, replacing the 'of' with 'if' (output to
input). Here's an example on my machine, remember I only have 3 GB RAM:
[root@cag-dl380-01 mjs]# ./dt of=/mnt/scratch/test limit=3g bs=1m
disable=compare,verify dispose=keep
Total Statistics:
Output device/file name: /mnt/scratch/test (device type=regular)
Type of I/O's performed: sequential (forward)
Data pattern written: 0x39c39c39 (read verify disabled)
Total records processed: 3072 @ 1048576 bytes/record (1024.000 Kbytes)
Total bytes transferred: 3221225472 (3145728.000 Kbytes, 3072.000
Mbytes)
Average transfer rates: 50135805 bytes/sec, 48960.747 Kbytes/sec
Number I/O's per second: 47.813
Total passes completed: 1/1
Total errors detected: 0/1
Total elapsed time: 01m04.25s
Total system time: 00m08.46s
Total user time: 00m00.00s
Starting time: Sun Aug 13 08:57:30 2006
Ending time: Sun Aug 13 08:58:35 2006
[root@cag-dl380-01 mjs]# ./dt if=/mnt/scratch/test limit=3g bs=1m
disable=compare,verify dispose=keep
Total Statistics:
Input device/file name: /mnt/scratch/test (device type=regular)
Type of I/O's performed: sequential (forward)
Data pattern read: 0x39c39c39 (data compare disabled)
Total records processed: 3072 @ 1048576 bytes/record (1024.000 Kbytes)
Total bytes transferred: 3221225472 (3145728.000 Kbytes, 3072.000
Mbytes)
Average transfer rates: 88252753 bytes/sec, 86184.329 Kbytes/sec
Number I/O's per second: 84.164
Total passes completed: 1/1
Total errors detected: 0/1
Total elapsed time: 00m36.50s
Total system time: 00m06.85s
Total user time: 00m00.02s
Starting time: Sun Aug 13 09:00:00 2006
Ending time: Sun Aug 13 09:00:36 2006
The 2 main things to note are the Average Transfer Rates and the Total
Elapsed time. Now here's another run using a file size of 1GB (I left
out the intermediate stats for the sake of brevity). As you can see the
reads are MUST faster (almost 250MB/sec) since it's reading out of
memory rather than disk:
[root@cag-dl380-01 mjs]# ./dt of=/mnt/scratch/test2 limit=1g bs=1m
disable=compare,verify dispose=keep
Total Statistics:
Average transfer rates: 50815988 bytes/sec, 49624.988 Kbytes/sec
Total elapsed time: 00m21.13s
[root@cag-dl380-01 mjs]# ./dt if=/mnt/scratch/test2 limit=1g bs=1m
disable=compare,verify dispose=keep
Total Statistics:
Average transfer rates: 249128033 bytes/sec, 243289.095 Kbytes/sec
Total elapsed time: 00m04.31s
-mark