Hello Hironobu,
I've done some read tests using the sg driver and the results are
pretty impressive. Hardware: AMD-K6 300MHZ, 64MB ram, Advansys
940UW (ultra wide, max theoritical throughput: 40MB/sec) and 2
ultra wide disks. See first 2 entries from cat /proc/scsi/scsi :
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DCHS04U Rev: 2727
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: MICROP Model: 4345WS Rev: p43D
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: SEAGATE Model: ST32151N Rev: HP02
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 04 Lun: 00
Vendor: TOSHIBA Model: CD-ROM XM-3701TA Rev: 3415
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 05 Lun: 00
Vendor: UMAX Model: Astra 1220S Rev: V1.2
Type: Scanner ANSI SCSI revision: 02
Ran the following script:
#!/bin/sh
time ~dougg/scsi/sgq_dd512 if=/dev/sga of=/dev/null count=191k tq=1 &
time ~dougg/scsi/sgq_dd512 if=/dev/sgb of=/dev/null count=191k tq=1 &
This is timing reading 100MByte (10**8 bytes) from the 2 drivers at
the same time. Results:
195584+0 records in
195584+0 records out
Avg_num_waits=0.003927, queue fulls=98.494764%, read_q
empty=99.607330%
0.03user 2.37system 0:09.52elapsed 25%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (93major+267minor)pagefaults 0swaps
195584+0 records in
195584+0 records out
Avg_num_waits=0.000654, queue fulls=98.821990%, read_q
empty=99.934555%
0.01user 2.29system 0:11.24elapsed 20%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (93major+267minor)pagefaults 0swaps
That is 200MBytes in 11.24 seconds elapsed or 17.8 MBytes/sec . Now this
test is taking chunks of 64Kbytes per transfer (so it uses
scatter-gather)
and command queing (both extensions in my sg driver). The Micropolis
disk I got cheap and later found out that command queuing doesn't work
so
it's turned off in the BIOS (as an aside, NT ignored that BIOS setting
and falls in a heap with this configuration).
A second test without command queuing, test script:
#!/bin/sh
time ~dougg/scsi/sg_dd512 if=/dev/sga of=/dev/null count=191k tq=1 &
time ~dougg/scsi/sg_dd512 if=/dev/sgb of=/dev/null count=191k tq=1 &
Results:
195584+0 records in
195584+0 records out
0.01user 1.64system 0:09.41elapsed 17%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (86major+27minor)pagefaults 0swaps
195584+0 records in
195584+0 records out
0.01user 1.49system 0:13.60elapsed 11%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (86major+27minor)pagefaults 0swaps
At 14.7 MBytes/sec that is a bit slower but much better than your times.
[The "tq=1" option is experimental turning on the TAGGED_QUEUING ioctl
but it seems not to effect timings.]
The specs for the IBM DCHS04U claim 10.3 to 15.4 MB/s media data rate.
Have not got the figures for Micropolis disk handy.
Here are some times comparing the sg's dd and the "real" one:
#!/bin/sh
time ~dougg/scsi/sgq_dd512 if=/dev/sga of=/dev/null count=191k
time ~dougg/scsi/sg_dd512 if=/dev/sga of=/dev/null count=191k
time dd if=/dev/sdb of=/dev/null bs=512 count=191k
time dd if=/dev/sda of=/dev/null bs=512 count=191k
Results:
195584+0 records in
195584+0 records out
Avg_num_waits=0.000000, queue fulls=98.952880%, read_q
empty=100.000000%
0.01user 1.93system 0:10.10elapsed 19%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (101major+267minor)pagefaults 0swaps
195584+0 records in
195584+0 records out
0.01user 1.33system 0:10.25elapsed 13%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (94major+27minor)pagefaults 0swaps
195584+0 records in
195584+0 records out
0.37user 1.86system 0:09.44elapsed 23%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (87major+11minor)pagefaults 0swaps
195584+0 records in
195584+0 records out
0.32user 2.01system 0:11.26elapsed 20%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (86major+11minor)pagefaults 0swaps
The second last read via dd on the Micropolis disk (sdb) , is an attempt
to clear out the block sub-system's buffers so the following dd read on
the IBM (sda) doesn't get many "cache hits". The test also seems to
indicate the Micropolis raw read time is faster than the IBM disk.
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]