LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-14-2004, 12:35 PM   #1
ad572
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
external usb 2.0 hard drive performance experiences


Greetings,

I'm looking for some insight into a performance issue with an external hard drive--I'm imaging the internal hard disk to it, and something is telling me that I should be able to expect a bit more than abysmal 800,000 bytes/sec transfer rates--this image of a 40Gig drive has been running for over 13 hours now!).

I'm working with a year-or-so old HP Compaq NX9010 laptop that I've booted to a Knoppix CD which runs a 2.4.27 kernel. In Knoppix, I'm in the process of imaging the internal hard disk (which has a broken windows installation i'm hoping to fix) out to a 250G USB2.0 external drive--a Maxtor OneTouch. The laptop specs USB 2.0 and this new external hard disk does as well. I'm using the usb cable that came with the external disk. I did have to repartition the external disk splitting it into FAT and ext2 partitions (since FAT32 wouldn't come close to supporting the file size my images would create).

The command I started 13 hours ago, and which should be about ready to finish was:
root@foo# dd if=/dev/hda of=/mnt/sda2/laptopdisk.dd.img

where hda is the internal laptop hard disk with the hosed windows installation (which is not mounted), and sda2 is the ext2 partition of the USB hard drive (which is mounted).

lspci indicates a usb 2.0 controller on the laptop:
0000:00:0b.2 USB Controller: VIA TEchnolgies, Inc. USB 2.0 (rev 51)

Sending a "kill -USR1" signal to the dd process spits out some in-progress stats--the latest shows:
38371893248 bytes transferred in 48138.170446 seconds (797120 bytes/sec)

I'm not sure what other commands I can run to find out more about where the slow down is occurring, but I'm all ears! It's not clear to me whether hdparm is something that can help me look at this, and I'm not sure if there are any usb diagnostics i can run to look at the interface while the transfer is going on.

Thanks in advance for any insight or shared experience. I was hoping an image would take less than 14 hours. :-)

Best Regards,
T
 
Old 10-14-2004, 12:55 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
First off, I would use partimage instead of dd to image the partitions:

http://www.partimage.org/

Second, knoppix always transfers at usb1.1 speeds; I've never been able to speed it up to usb2.
I use kanontix which is based on knoppix but functions at usb2 speeds by default. Partimage is on both knoppix and kanontix by the eay.
 
Old 10-14-2004, 02:00 PM   #3
ad572
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by kilgoretrout
First off, I would use partimage instead of dd to image the partitions:

http://www.partimage.org/

Second, knoppix always transfers at usb1.1 speeds; I've never been able to speed it up to usb2.
I use kanontix which is based on knoppix but functions at usb2 speeds by default. Partimage is on both knoppix and kanontix by the eay.
Well that sure explains it. Ugh USB 1.1 speeds are indeed painful. How did you discover this about Knoppix, or is it a well know thing I've missed?

What's the advantage of using partimage? I can see it'd be faster as it doesn't save free blocks, but can you mount the resulting image file like a disk as you can with dd images, documented here: http://talk.trekweb.com/~jasonb/arti...loopback.shtml

Thanks again for your reply--it solved the mystery.
 
Old 10-14-2004, 04:20 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Knoppix has USB 2.0. You will have to use one of the four usb modules (uhci, ohci, usb-uhci, and usb-ohci). You can try to load ehci-hcd after you have removed uhci, ohci, usb-uhci, or usb-ohci ussing the rmmod command. I get better results with uhci with VIA chipsets though VMware complains about that module. VMware saids it can only handle usb-uhci.
 
Old 10-14-2004, 05:45 PM   #5
ad572
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Electro
Knoppix has USB 2.0. You will have to use one of the four usb modules (uhci, ohci, usb-uhci, and usb-ohci). You can try to load ehci-hcd after you have removed uhci, ohci, usb-uhci, or usb-ohci ussing the rmmod command. I get better results with uhci with VIA chipsets though VMware complains about that module. VMware saids it can only handle usb-uhci.
Thanks Electro,

I did discover another issue that might be the culprit here as well. Buried in the non-printed manual for this Maxtor One Touch 250Gb external usb 2.0 drive is a ditty that says that you won't get full write speed until this thing has been power cycled 10 times. Dunno what the heck that's all about, but having powered it up only 4 times at most when this was done, I think that might also be to blame.

I'll be able to test it a little later, I'm curious to see if it was Knoppix or my failure to RTFM on this goofy drive requirement.

Quote:
Maxtor OneTouch User's Guide, Troubleshooting and FAQ's

2. My drive appears to read files significantly faster than it
writes files

Your drive includes a special data protection function, which
automatically verifies all data written to the drive during
the first few uses of the product. It’s similar to the
break-in period for a new car. The verification process is
performed while data is being written, causing reduced write
performance.

This verification function is automatically turned off after
your drive has been powered on and off ten times (you need to
leave the drive running for 15 seconds before powering it off
and leave it off for 15 seconds before powering on
again). After this break-in period, you should see
approximately the same performance for reading and writing
data

Last edited by ad572; 10-15-2004 at 10:26 AM.
 
Old 10-15-2004, 11:56 AM   #6
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I've powered my maxtor one touch much more than 10 times, have ehci loaded and knoppix still gives me usb1.1 speeds and knoppix is the only distro where I've had this problem. Go figure.

Re your questions about partimage, no, you can't browse a partimage archive. Partimage's advantages over dd are that it's faster because only data blocks are copied; it gives about 2 to 1 compression; and it has a nice interface.
If you need to browse the archive, you could probably just use tar with compression for your backups but that won't work on ntfs, i.e. you could create the ntfs tar archive but you can't restore anything from it since linux doesn't support writing to ntfs.
 
Old 10-15-2004, 04:25 PM   #7
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Try other live LINUX CD distributions or re-compile the kernel for Knoppix to include support for USB 2.0. I think Knoppix has a tutorial how to do that.

You can send an e-mail to partition image developers to add support for viewing files from the image.
 
Old 10-15-2004, 04:50 PM   #8
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I use kanontix and get usb2 speeds. It's a livecd based on knoppix and gives you a debian testing if you install it to your hard drive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
External USB hard drive jhmorris47 Linux - Hardware 6 05-02-2006 04:14 PM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
XS Drive II external USB hard drive/card reader max74 Linux - Hardware 7 10-21-2003 10:41 PM
External USB hard drive bob10a Linux - General 3 08-09-2003 03:48 PM
external usb hard drive TX_metalhead Linux - Hardware 0 05-06-2002 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration