> I was wondering if anyone had any expertise to share about USB hard
> drives.  I'm finding that access to mine seems terribly slow; far
> slower than I think it ought to be.

Sound to me like you have a USB 1.1 device.  I recall my disk being 
extremetly slow on USB 1.1  I've since purchased a USB 2 drive 
enclosure and noticed a substancial increase in performance, though 
nothing close to a drive on an IDE or SCSI bus.

Some things to look at:

What file system is the old drive?  FAT? Ugh.  Try EXT2 for a backup 
drive.

There are serious delete performace gains to be had with EXT2.
See here:
http://oregonstate.edu/~kveton/fs/page2.php

Please note the charts for various kernel versions.  It makes some 
difference in the performance vs fs benchmarks he's got.

Are you mounting the disk with 'noatime'? check /etc/fstab or
if you're using the cmd line then use '-o noatime'

Heres my /etc/fstab line for my usb disk:
/dev/sda1 /mnt/usbdisk/boot auto rw,user,noauto,noatime 0 0

I use 'auto' for the fs because sometimes I hook up friends USB drives 
from their winderz boxen (fat32) UGH!

> Is there some tuning or hdparming sort of thing I should do?

hdparm is for IDE disks, and does not apply to USB connected devices 
because they show up as SCSI devices.  It is possible that the IDE to 
USB chip in the box you have does not automatically use DMA to access 
the drive.  This might possibly be due to driver issues in the 
kernel.  I'm guessing here as I am not a kernel guru.  I'd suggest 
upgrading to the 2.6.x series if you're on 2.4 to see if that makes a 
difference.

You can use HDPARM for some things on SCSI disks...  Here's a timeing 
test for my USB2 connected drive.  There's not much else you can do 
with it on SCSI though... (someone please correct me if I'm wrong)

# hdparm -Tt /dev/sda1

/dev/sda1:
 Timing buffer-cache reads:   1276 MB in  2.00 seconds = 637.78 MB/sec
 Timing buffered disk reads:   60 MB in  3.06 seconds =  19.63 MB/sec

That's my 5400RPM 30GB IBM TravelStar [DeathStar?] in a USB2 
enclosure.

Bottom line, reformat the drive in ext2 if it isn't already and turn 
off the access time stamping of files with 'noatime' or get a USB2 
enclosure...

One other side note.  The number of files radically affects how long 
it takes to create/delete things.  EXT2 smokes all the journaled FS's 
in delete performance. (see the charts on the above linked page)


On Wednesday 29 September 2004 10:50, rpgoldman at real-time.com wrote:

> rm -rf for 3 megabytes: 50 seconds
> rm -rf for 5.5 megabytes: 2 minutes 40 seconds!

Here's a test for comparison:

#find /mnt/usbdisk/home/user/ -name "*" |wc -l
  89218

#time rm -rf /mnt/usbdisk/home/user/*

real    1m21.367s
user    0m4.076s
sys     0m4.812s

That was 16GB of data in 89218 files...

Now you have something "real world" to compare your gains/losses to in 
your experimentation.

Cheers,

-- 
Christopher A. Gahlon

There are 10 kinds of people in the world, those that understand 
binary and those that don't.

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list