H.Oura FCT Headquarters?? wrote:
>     I've calculated data transmission rate of my SCSI-2 disk.  My SCSI
> hardwares are : Adaptec AHA2940UW + Fujitsu MAB3091(Wide SCSI-2 disk).
> I repeatedly wrote 128KB data to MAB3091 using SG interface, and counted
> the time between write(sending CDB) and read(receiving status) call.
> The average time for 128KB data transmission is 24msec.
> So, the data transmission rate is 5.3MB/sec.
> 
> I know some kind of overheads are included, but it's too slow for Wide
> SCSI-2 (peak performance(?) of Wide SCSI-2 is 20MB/sec, I guess).
> 
> Any suggestions ?
> 

You can relatively accurately figure out the command overhead and the
data transfer rates by getting timing for two different transfer sizes.
You must make sure the data is coming from (or going to) the devices
cache. You should use small buffer sizes.

To figure out overhead and transfer rates, you do some simple algebra...

Assumptions...
Buff1size = bytes being transferred for first sampling
Buff2size = bytes being transferred for second sampling (different than
Size1)

Gather data...
Time1 = Average time to transfer Buff1size bytes
Time2 = Average time to transfer Buff2size bytes

Calculate...
TransferRate =  (Buff2size - Buff1size) / (Time2 - Time1);
Overhead     =    ( (Buff2size/Buff1size)*Time1 - Time2 ) \
                / ( (Buff2size/Buff1size) - 1 );

Example:
Buff1size = 512 (one sector)
Buff2size = 1024 (two sectors)
Time1     = 0.0552 seconds
Time2     = 0.1064 seconds

TransferRate    = (1024-512) / (0.1064-0.0552)
                = 512 / 0.0512
                = 10,000 (bytes/sec)

Overhead        = ( (1024/512)*0.0552 - 0.1064 ) / ( (1024/512) - 1)
                = (2*0.0552-0.1064) / (2-1)
                = (0.1104-0.1064) / 1
                = .004 (seconds)

Don't use integer arithmetic!  Let me know what you find out.

<>< Lance.

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to