# speed of SCSI-disks

## meyerm

Hi,

I've got a Compaq SP700 with an NCR U2W-SCSI controller onboard. I'm using the SYM53C8XX driver, compiled into the kernel. There are three drives inside the machine, gentoo resides on the second disk (sdc, sda is an external ZIP).

I've started some write/read tests and am now really puzzled. Can that all be? Aren't the disks a little bit slow?

```
pegasus linux # hdparm -tT /dev/sda && hdparm -tT /dev/sdb && hdparm -tT /dev/sdc && hdparm -tT /dev/sdd

/dev/sda:

 Timing buffer-cache reads:   128 MB in  0.69 seconds =185.51 MB/sec

 Timing buffered disk reads:  64 MB in 78.19 seconds =838.16 kB/sec

/dev/sdb:

 Timing buffer-cache reads:   128 MB in  0.70 seconds =182.86 MB/sec

 Timing buffered disk reads:  64 MB in  3.53 seconds = 18.13 MB/sec

/dev/sdc:

 Timing buffer-cache reads:   128 MB in  0.70 seconds =182.86 MB/sec

 Timing buffered disk reads:  64 MB in  3.32 seconds = 19.28 MB/sec

/dev/sdd:

 Timing buffer-cache reads:   128 MB in  0.71 seconds =180.28 MB/sec

 Timing buffered disk reads:  64 MB in  4.44 seconds = 14.41 MB/sec 
```

Since they are no IDE-disks I can't tweak the usual way with DMA, 32Bits and so on... I've already read a similar thread in the forum but there was no solution for SCSI.

Has anybody an idea or will I have to live with that "performance"?  :Rolling Eyes: 

Thanks,

Marcel

```
pegasus linux # cat .config | grep CONFIG_SCSI_SYM53C8XX

CONFIG_SCSI_SYM53C8XX_2=y

CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1

CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16

CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64

# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
```

```
pegasus root # dmesg

(...)

SCSI subsystem driver Revision: 1.00

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.4

        <Adaptec 2940A Ultra SCSI adapter>

        aic7860: Ultra Single Channel A, SCSI Id=7, 3/253 SCBs

  Vendor: HP        Model: C5110A            Rev: 3638

  Type:   Processor                          ANSI SCSI revision: 02

  Vendor: IOMEGA    Model: ZIP 100           Rev: J.02

  Type:   Direct-Access                      ANSI SCSI revision: 02

sym.2.8.0: setting PCI_COMMAND_PARITY...

sym.2.8.0: setting PCI_COMMAND_INVALIDATE.

sym.2.8.1: setting PCI_COMMAND_PARITY...

sym.2.8.1: setting PCI_COMMAND_INVALIDATE.

sym0: <875> rev 0x14 on pci bus 2 device 8 function 0 irq 28

sym0: No NVRAM, ID 7, Fast-20, SE, parity checking

sym0: SCSI BUS has been reset.

sym1: <875> rev 0x14 on pci bus 2 device 8 function 1 irq 29

sym1: No NVRAM, ID 7, Fast-20, SE, parity checking

sym1: SCSI BUS has been reset.

scsi1 : sym-2.1.17a

scsi2 : sym-2.1.17a

sym0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50.0 ns, offset 15)

  Vendor: COMPAQ    Model: HD0094172B        Rev: 3208

  Type:   Direct-Access                      ANSI SCSI revision: 02

  Vendor: IBM       Model: DNES-318350W      Rev: SA30

  Type:   Direct-Access                      ANSI SCSI revision: 03

  Vendor: SEAGATE   Model: ST39173W          Rev: 6244

  Type:   Direct-Access                      ANSI SCSI revision: 02

sym0:0:0: tagged command queuing enabled, command queue depth 16.

sym0:1:0: tagged command queuing enabled, command queue depth 16.

sym0:2:0: tagged command queuing enabled, command queue depth 16.

Attached scsi removable disk sda at scsi0, channel 0, id 5, lun 0

Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0

Attached scsi disk sdc at scsi1, channel 0, id 1, lun 0

Attached scsi disk sdd at scsi1, channel 0, id 2, lun 0

SCSI device sda: 196608 512-byte hdwr sectors (101 MB)

sda: Write Protect is off

Partition check:

 /dev/scsi/host0/bus0/target5/lun0: p4

SCSI device sdb: 17773500 512-byte hdwr sectors (9100 MB)

 /dev/scsi/host1/bus0/target0/lun0: p1

sym0:1: FAST-20 WIDE SCSI 40.0 MB/s ST (50.0 ns, offset 16)

SCSI device sdc: 35843670 512-byte hdwr sectors (18352 MB)

 /dev/scsi/host1/bus0/target1/lun0: p1 p2 p3

sym0:2: FAST-20 WIDE SCSI 40.0 MB/s ST (50.0 ns, offset 15)

SCSI device sdd: 17783240 512-byte hdwr sectors (9105 MB)

 /dev/scsi/host1/bus0/target2/lun0: p1 p2

(...)
```

----------

## mb

hi...

is your controller runnning fast wide scsi???? so the transfer is limited to 20MB/sec....

so, sdb and sdc are looking ok....

my disk (running u2w imho):

```

hades / # hdparm -tT /dev/sda

/dev/sda:

 Timing buffer-cache reads:   128 MB in  0.47 seconds =270.04 MB/sec

 Timing buffered disk reads:  64 MB in  1.37 seconds = 46.61 MB/sec

```

#mb

----------

## meyerm

Hi,

Thanks for your response.  *mb wrote:*   

> is your controller runnning fast wide scsi?

 

Hmm, it seems to:

```
sym0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50.0 ns, offset 15) 

  Vendor: COMPAQ    Model: HD0094172B        Rev: 3208 

  Type:   Direct-Access                      ANSI SCSI revision: 02 
```

I thought the 40.0 MB/s is the possible throughput. Isn't it? If no, what is it.  :Smile:  And did I just mix up my controllers or is the driver misconfigured (since I was fairly sure, the disks are U2W  :Embarassed: )

----------

## mb

ok.. my fault   :Embarassed: 

fast wide scsi  20 MB/sec

fast20 wide scsi 40 MB/sec ( but this is usually called ultra scsi (wide))

do you use the 68-pin ultra scsi wide cable ???

maybe try to remove the zip drive and the other HD.. it's possible that your controller can't switch to the highest mode if a non uw capable device is attached to the bus...  this is imho mixing of narrow and wide devices...

(this *may* also break your bus termination)

#mb

----------

## meyerm

 *mb wrote:*   

> ok.. my fault  

 

Doesn't matter. I'm also confused by those dozend of SCSI-"standards".  :Smile: 

 *mb wrote:*   

> do you use the 68-pin ultra scsi wide cable ???

 

jupp, of course. Not one of these "damn, this wasn't an IDE-disk"-SCSI(1|2)-connectors...  :Laughing: 

 *mb wrote:*   

> maybe try to remove the zip drive and the other HD.. it's possible that your controller can't switch to the highest mode if a non uw capable device is attached to the bus...  this is imho mixing of narrow and wide devices...

 

I don't think it is the ZIP. The ZIP and the HP Scanner are attached to a second (or for the system: the first) SCSI-controller (Adaptec PCI). The onboard controller only serves the three disks.

And I can't image the disks are the problem since they _are_ U2W. BTW: I've rebooted 3 times, each time with another disk attached (without the other two) and they all came close to ~20 MB/s -> the disks are capable of delivering at least 20 MB/s.

Therefore it really looks like some kind of configuration problem for me (or this controller is really somehow limited to 20 MB/s. Again some kind of compaq's "surprises"?  :Wink:  ). But as you can see at Compaqs hompage the box should be U2W = 80MB/s.

 *mb wrote:*   

> fast20 wide scsi 40 MB/sec ( but this is usually called ultra scsi (wide))

 

BTW: you were of course right with this. UW is 40 MB/s. Why they called it Fast20 Wide SCSI is a riddle for me. Perhaps there is the error? Is the driver recognizing the controller wrong?

How can I measure the disk speed with Windows 2000? I could try to reawaken my old Windows-partition to see if it also only get's that slow speeds...  :Confused: 

Is there

----------

## rommel

you could download atto drive bench from attotech.com...that will give you a graphical io in win2k

----------

## mb

ok... what about:

CONFIG_SCSI_NCR53C8XX_SYNC (below  SYM53C8XX)

```

The SCSI Parallel Interface-2 Standard defines 5 classes of transfer

rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers

are respectively the maximum data transfer rates in mega-transfers

per second for each class.  For example, a FAST-20 Wide 16 device is

able to transfer data at 20 million 16 bit packets per second for a

total rate of 40 MB/s. 

You may specify 0 if you want to only use asynchronous data

transfers. This is the safest and slowest option. Otherwise, specify

a value between 5 and 80, depending on the capability of your SCSI

controller.  The higher the number, the faster the data transfer.

Note that 80 should normally be ok since the driver decreases the

value automatically according to the controller's capabilities.

```

i hope, that the value set is not 20   :Wink: 

[edit]

hmm.. if the value would be 20 the messge from your controller should be  FAST-20 WIDE SCSI 20.0 MB/s instead of 40 

#mb

----------

## CoreDump

Your disks are running in UW mode (or U2W single ended so downgraded to UW).

I noticed that if you attach a U2W/U3W disk that is running beyond 40Mo/s on a UW interface, you will never reach 40Mo/s. Maximum speed will be about half the max speed of the disk.

For example, my Quantum 10KII speed is 53Mo/s in U3W mode. In UW mode it is only 25Mo/s.

A simple explanation is interleaving: once the cache is filled, only 1/2 spin gives data... The same problem happens with recent IDE drives on UDMA33 interfaces.

----------

## meyerm

 *mb wrote:*   

> CONFIG_SCSI_NCR53C8XX_SYNC (below  SYM53C8XX)

 

Oh, nice.  :Cool: 

I've used the old SYM driver for quite a long time and compiled it also for gentoo into the kernel. But if one select this driver, the driver suggested by you is not even viewable.

OK, now I've recompiled with the driver you suggested (and since it really (at least the README tells so  :Wink:  ) seems to be better (TM) I think I will keep it). But the results are the same. And yes: here I've selected the correct SYNC value. BTW: After reading some READMEs, I'm now sure that my controller supports 40MB/s (not 80, but anyway...)

 *rommel wrote:*   

> you could download atto drive bench from attotech.com...that will give you a graphical io in win2k

 

Thanks for the link. I wasn't able to find it, but I got a benchmark called "sandra". I let it run and it said something about 10-12 MB/s...  :Confused: . Puuh, fortunately I'm doing almost all my work with Linux.

 *CoreDump wrote:*   

> Your disks are running in UW mode

 

That sound reasonable (or at least I believe you  :Wink: ). Is there anything I can do against? I should repeat I'm quite unversed in SCSI things... Can there by any problems with my temination?

----------

