# External hard drive access _too_ fast

## MockieMoo

Yes, you heard me right; no, I'm not crazy.  :Wink:  I want to slow down access to my external harddrive. It's connected through firewire and it's SCSI, so hdparm doesn't do it for me. I can't find out how to do it, does anyone else know?

----------

## widan

There is sdparm, but it's not very user-friendly, and I don't know if it can change transfer speed. But why do you want to slow down a disk ? I just can't think of any reasons to do that.

----------

## MockieMoo

 *widan wrote:*   

> There is sdparm, but it's not very user-friendly, and I don't know if it can change transfer speed. But why do you want to slow down a disk ? I just can't think of any reasons to do that.

 

I think you're right; I can't find anything to change transfer rate either.

The reason I want to slow it down is that if I try to write too much data to the drive at once, it hangs. I can read from it just fine for hours at a time, however. I think it might be a combination of cheap hardware and the kernel driver doesn't support the hardware, but I thought changing the transfer rate would be an easy fix.

----------

## MockieMoo

I hate to bump, but does anyone know if it can/can't be done?

----------

## meyerm

sbp2 parameter max_speed to 0  :Smile: 

Down to 100 MBit is possible using the firewire bus (3 = 800mb, 2 = 400mb default, 1 = 200mb, 0 = 100mb). Slower? I don't know.

hth

Marcel

----------

## soviet/funk

a little bump here, but i'd rather not slow down my disk...   :Confused: 

I'm on my second FW/USB2 disk now with the same problem. 

It seems to go to sleep everytime i transfer files to it. I thought it was some kind of power failure or spindown, but I guess mine coud be the same problem as above. But i don't see why i should throttle my bus speed? Why do they make firewire interfaces if no disk can take it? 

My disk is a pocket size case with 2.5" laptop drive - 80 gb @ 5400 RPM - not a speed monster, no. 

It seems to stay alive a little longer on USB2 than on FW, which does make sense if it is excessive interface speed that chokes it. I've used Lacie disks with FW800 interfaces without problems on Macs before, but they have hardware RAID and 7200RPM disks with good buffers. Would I see better performance with a 7200 rpm 2,5" disk in my external case? (If they even exist, must check..)

Is the disk too slow for a fw interface? 

No hope in sdparm?

----------

## ph03n1x

7200 2.5" hds do exist, I have one 60gb

afaik there are 7200 disks between 20-80gb atm...

----------

## soviet/funk

 *meyerm wrote:*   

> sbp2 parameter max_speed to 0 

 

Where does this go?

kevin

EDIT: do i need to have ieee1394 and sbp2 as modules to do this?

----------

## meyerm

 *soviet/funk wrote:*   

> 
> 
> Where does this go?
> 
> 

 

```
meyerm@yavin ~ $ cat /etc/modules.d/sbp2

options sbp2 serialize_io=1 max_speed=2

```

There you can also enter the =0 option. Don't forget to "update-modules" afterwards.

 *soviet/funk wrote:*   

> EDIT: do i need to have ieee1394 and sbp2 as modules to do this?

 

You can also append module options to the kernel boot line.

----------

## soviet/funk

Thanks all, with sbp2 limited to 200mbps my 2nd drive case now passes the write test it failed two days ago. 

Shoot, I purchased the new case precisely because I thought the case was the problem. 

And oh my disappointment when the new one did the same hangup on me... 

The funny thing is still that my case/drive never had any problems under Windows. 

Under linux it would freeze very quickly. 

And under OS X it goes OK for a while, and then hangs round the middle or end of a big file copy process. 

At least this was the case with the old case, I'll be testing the new one on various speeds and platforms before i know for sure. 

Now if anyone else know for sure that a 7200 rpm (or specific drive/case combination) can handle the default 400mbps speed, 

or another way to make this work without speed limiting sbp2, i'd be very happy. 

It doesn't seem right that i should have to switch module options or even kernel options at boot if i switch between different drives. 

Although I'll admit that 200mbps seems quick enough for my needs...

thx

kevin

EDIT: I've tested some more now and found that my drives both performed well with sbp2 max_speed=2 (ie 400mbps). No hangs or freezes anymore. 

Why the improved performance when i manually define something that should already be the default? I did copy in the "serialize" argument from above as well, was that the big difference? What does "serialize" do?

----------

## dementer

I wonder, is it getting too hot? Many small form factor drives need a lot of TLC in this regard, and while it may not feel hot on the outside (unusual) writing heaps may be cooking up the internals nicely. Hence the reason it goes to sleep, to save itself. 

Is there a time difference between a windows transfer and the slowed down linux transfer for the same file?

----------

## soviet/funk

Heat: no, not in my case (yeeha, double entendre). Before i changed my settings both of my 2,5" harddrive enclosures failed AS A RULE, no matter how long or short time they'd been connected. 

Windows vs Linux: No, i have not taken the time to benchmark my drives. I was mostly very happy to have them working properly. But I find now i would like to know. I'll do a test later today (if time) with one cd image (big file) and an old website backup (thousands of small files and folders). Or is there another benchmark that would reliably test my performance difference?

Another odd behaviour which I haven't had a chance to try again post-sbp2-speed-limit, is connecting a Mac to the firewire and restarting it in firewire disk mode (it behaves just like any external fw drive then, no eth1394). I saw abysmal performance the last time i tried that. I transfered a 6 gb file in about as many hours. It would only move data in 10-30 second pulses, and then fall asleep for a few minutes. 

kevin

----------

## paluszak

I had exactly the same problem with my IEEE1394-connected hard drive, but it was the case problem - I bought a new case and everything started to work fine. The old case died one day anyway, I gave it back to the shop, they gave me a new one and everything works fine now with both cases. You can also try to tweak serialize_io as well.

J.

----------

