# SCSI performance is slow

## Mow

I've got  2 SCSI 320 drives hooked up to my 29320 SCSI card and throughput seems to be bad. I checked and when the kernel boots it says the drives are capable of 320 mb a second but when I run hdparm on it I shows that my buffered reads are only 45 mb a second. Not I'm not sure if this is the correct utility to use but there seems to be settings in there that can apply to SCSI.

Can someone help me out with what I need to do to tweak my SCSI drives?  I'm new to SCSI so I'm not sure what settings to apply or where to tweak to get the most out of my drives. Thanks.

----------

## cathalob

Not full sure about tweaking the performance but I read recently that U320 don't get much better than 80Mb/sec. 

Additionally depending on what partition you run the test on you will get different readouts for example if I run hdaprm on partition sda1 i get approximately 70Mb/sec and as I move toward /dev/sda7 I get around 50 Mb/sec.

However those more learned than I may disagree......

----------

## Mow

great ...... so it's an issue with the performance just not being there for U320 yet then ..... which makes sense judging based off of what I've seen.

----------

## Crg

 *Mow wrote:*   

> great ...... so it's an issue with the performance just not being there for U320 yet then ..... which makes sense judging based off of what I've seen.

 

What drives are you using?

It doesn't matter what your connection is ATA/100, ATA/133, SATA/150, Ultra160, Ultra320, if your drive only does a sustained 5MB/sec that's all you're going to get (unless the info is in the drive's cache).

The top drives that I've looked at nowadays seem to have a top transfer rate from the disk of ~85ish (SATA) and ~110ish (15k rpm SCSI) so to get 320Mbytes/sec you'd need about 3 high end scsi drives Raid 0 (striped).

My old 10k drives from ~4 years ago only do about 33Mbytes/sec.

And as cathalob the transfer speed depends on where on the drive you are reading for - those speeds above are the top end, most of the drive reads slower than the examples given above.

----------

## ewan.paton

your cable and terminator also mater i have a fast drive but am useing an old cable and 1gig scsi to terminate it so am limited to 40 megs/sec

----------

## Mow

Thanks all for the replies. I've got the 15,000 RPM seagate 35 gig U320s. 

I'm not expecting to get the top 320 speed because I know that is unrealisitc. But when I saw I was getting only 45 mb I was a little more than concerned  :Smile: 

If all I am to get is 110 then I could live with that because it's more than double than what I'm getting now.

On a note on the termination ... this is actually a new cable. I'm not sure what the terminator is on the end. That may be my limiting factor. There isn't anything hooked up to the cable that isn't SCSI 320 capable.

----------

## Crg

 *Mow wrote:*   

> I'm not expecting to get the top 320 speed because I know that is unrealisitc. But when I saw I was getting only 45 mb I was a little more than concerned 

 

Looking at cheetah 15k.3 specs (which I assume from what you've said you have  :Smile:  ), the min internal transfer rate is 56MByte/sec (max 86) so I would expect more than 45mb... 

What kernel are you running/what does hdparm -a /dev/sd[ab] show you?

----------

## Mow

kernel 2.6

and I'm not in front of that machine at the moment so this is from memory

hdparm -tT  /dev/sda

first reply (can't remember)

second buffered read 45.75 /mb sec

----------

## Crg

 *Mow wrote:*   

> kernel 2.6
> 
> and I'm not in front of that machine at the moment so this is from memory
> 
> hdparm -tT  /dev/sda
> ...

 

I was interested in what the readahead was (-a), if it's 2.6 I would expect it to be about ~2048, you might want to double check.

Is anything else going on with the disks when you're running the test?

----------

## Mow

I will have to test that later.

No the the only thing running when I do a HDPARM is HDPARM  :Smile: 

----------

## dvc5

Also you have to remember that U320 is useless unless you have a 64-bit PCI scsi adapter (or an on-board scsi  :Wink: ). This is because the *theoretical* bandwidth for a 32-bit PCI slot is 133MB/s, so a U160 drive doesn't even get to max out on that. Therefore, U320 is overkill unless you have a 64-bit PCI system.

----------

## Mow

You know I had forgotten that .... (d'oh) ....... I don't have a 64-bit slot so maybe I'll just take these drives out and put in a SATA drive or 2 and use them in my server. 

However I still would like to know why I'm only getting 45 mb a sec.

----------

## dvc5

 *Mow wrote:*   

> You know I had forgotten that .... (d'oh) ....... I don't have a 64-bit slot so maybe I'll just take these drives out and put in a SATA drive or 2 and use them in my server. 
> 
> However I still would like to know why I'm only getting 45 mb a sec.

 

As mentioned earlier, your cables need to be rated for at least U160. Also if you're using SCA drives w/ the adapters, you need to make sure they're also rated for U320. I had a similar issue with my IBM 9.1GB U160 drive until I bought a new cable. Also have you updated your SCSI bios? What sync speed does that report when your system boots?

----------

## Mow

Yep I caught that .... and they are rated for 320 and I'm not using any adapters so the hardware is all capable.

----------

## Crg

 *Mow wrote:*   

> You know I had forgotten that .... (d'oh) ....... I don't have a 64-bit slot so maybe I'll just take these drives out and put in a SATA drive or 2 and use them in my server. 

 

The only 29320 cards I have seen are PCI-X (64bit/133MHz), are you running it in a 32bit/33MHz slot?

I know my 29160 (64bit/66Mhz) is supposed to be able to work in a 32bit slot, wasn't sure if the 29320 could.

----------

## Mow

Yes the 29320 is backwards comaptible.

----------

## Ragnar

My 15K.3 is on a 19160 SCSI card and I get 68Kb/s...

When you boot up an the SCSI bios finds the HDD what transfer rate is it set to?

or do a dmesg | grep SCSI....

It should return the transfer rate the HDD is set to....

----------

## dvc5

 *Ragnar wrote:*   

> My 15K.3 is on a 19160 SCSI card and I get 68Kb/s...
> 
> When you boot up an the SCSI bios finds the HDD what transfer rate is it set to?
> 
> or do a dmesg | grep SCSI....
> ...

 

You should see a line similar to this if you do "dmesg | grep scsi"

```
(scsi1:A:0): 40.000MB/s transfers (20.000MHz, offset 8, 16bit)
```

Note grepping for "scsi" and not "SCSI". This bandwidth should match what your SCSI bios detects. If not, then you have either a driver or a hardware issue.

----------

## Crg

 *Mow wrote:*   

> Yes the 29320 is backwards comaptible.

 

It won't be the reason you only get 45MB/s though I wouldn't think, an old Ultra2 controller of mine connected to 32bit PCI gets ~60MB/s (2.6.3-mm1 CFQ IO sched).

----------

## Mow

 *Quote:*   

> When you boot up an the SCSI bios finds the HDD what transfer rate is it set to

 

It comes up and says 320 mb a second 32 bit 33/66 mhz and I get that on both drives. So it seems it's reporting correctly.

----------

## Ragnar

My HDD had a similar problem at first...

I only got 40 mb/s because the Ultra160 Cable was bent or somthing...   :Confused: 

I just moved the cable arounda bit, and the problem went away...  :Smile: 

Is the card new?

Have you tried changing the the settings in the SCSI bios?

Have you checked dmesg for scsi errors?

----------

## dvc5

 *Mow wrote:*   

>  *Quote:*   When you boot up an the SCSI bios finds the HDD what transfer rate is it set to 
> 
> It comes up and says 320 mb a second 32 bit 33/66 mhz and I get that on both drives. So it seems it's reporting correctly.

 

Then it sounds like you might be using the wrong kernel settings. Which driver are you using for your controller? I believe it should be the aic79xx driver for your card.

----------

## Mow

 *Quote:*   

> Then it sounds like you might be using the wrong kernel settings. Which driver are you using for your controller

 

I did verify the kernel settings are using the correct drivers (the ones for U320).

 *Quote:*   

> Is the card new? 
> 
> Have you tried changing the the settings in the SCSI bios? 
> 
> 

 

Yes it's fairly new .... the problem is I get better throughput in *gulp* Winblows (I'm dual booting)

----------

## Ragnar

What drriver have you compiled in to the kernel?

I hope that you are not using aic7xxx or the old version of aic7xxx driver....

----------

## ewan.paton

just to fork the scsi topic slightly but why does the new scsi driver in 2.6 take so bloody long to do whatever. i knew they planned on cleaning up the code but i figured it would be faster, now scsi detection  adds 30 secs + to my boot time

----------

## Crg

 *ewan.paton wrote:*   

> just to fork the scsi topic slightly but why does the new scsi driver in 2.6 take so bloody long to do whatever. i knew they planned on cleaning up the code but i figured it would be faster, now scsi detection  adds 30 secs + to my boot time

 

If you're using the aic7xxx drive try changing the "Initial bus reset delay.." I have mine set to "2000".

----------

## Mow

Well I think I may have sorta found my problem. I moved these drives to another machine, installed Winblows since it's less forgiving than *nix and the install would never take. It turns out that I had to terminate my other channel which leads me to believe that channel has gone bad and I will be sending in the card for repair.

Thanks all for the replies ...... I've gone and gotten a nice new SATA drive that performs exceptionally well.

----------

## dvc5

 *Mow wrote:*   

> Well I think I may have sorta found my problem. I moved these drives to another machine, installed Winblows since it's less forgiving than *nix and the install would never take. It turns out that I had to terminate my other channel which leads me to believe that channel has gone bad and I will be sending in the card for repair.
> 
> Thanks all for the replies ...... I've gone and gotten a nice new SATA drive that performs exceptionally well.

 

That sucks that it was a hardware failure. SATA is still inferior to SCSI IMHO. Hopefully they'll send you a new card.  :Rolling Eyes: 

----------

## Mow

I would agree that SCSI is inferior to SATA.

----------

## Crg

 *Mow wrote:*   

> I would agree that SCSI is inferior to SATA.

 

Surely you meant the other way round?  SATA is inferior to SCSI.

SCSI:

Less CPU cycles wasted

Higher spec'ed disks available

Higher spec'ed controllers available (SATA is only 150MB/s, where as you can get dual channel ultra320, 320MB/s each channel, PCI-X cards.)

----------

## Mow

Yes ........ yes I did  :Smile: 

----------

