LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2009, 10:12 PM   #1
scitobor
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Resurrecting a thread: slow usb write speeds


I am seeing slow writes to a usb 2.0 HDD on ubuntu 9.04. The thing is that when first installed, and off the livecd, I see speeds of 15+MB/s, but now (a few days later) I can only get speeds starting at about 5MB/s trailing off to 1.5MB/s sustained (this is copying around 700+MB avi files)

Now. This thread:
http://www.linuxquestions.org/questi...slow+write+hdd

Is discussing exactly that issue, but got closed by a moderator just as it was getting interesting. I can't post to the moderator (pixellany) to reopen the thread, cos I am a newbie, and I need at least one post to activate that functionality I think.

This is that post I hope; but while I'm setting to reopen that thread - any ideas?

Last edited by scitobor; 09-03-2009 at 12:07 AM.
 
Old 09-02-2009, 10:30 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi welcome to LQ!

Quote:
This is that post I hope; but while I'm setting to reopen that thread - any ideas?
And yes, of course:

Why don't you post *your* answers to the questions that were posed then?


Cheers,
Tink
 
Old 09-02-2009, 11:09 PM   #3
scitobor
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Hi welcome to LQ!


And yes, of course:

Why don't you post *your* answers to the questions that were posed then?


Cheers,
Tink
Touche.

My configuration is ubuntu jaunty (9.04) on a Sony Vaio G11 (2GB, Intel core solo U1500; Intel 950 graphics chipset) dual booting to win XP. Trying to use a 500GB USB2.0 (NTFS filesystem) to store videos and largish backups.

On the thread in question, rkelsen had suggested a change to the scheduler:

### quoted - cut and paste (i'm new here) ###

Seeing this behaviour between hard disk partitions would indicate that the default scheduler may not be best for your needs. Your config files indicate that the CFQ scheduler is the default on both kernels.

I'll explain how to change it now, because I'm going to bed shortly...

The output of the command in the previous post should look something like this:
Code:

$ cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq]

In this case, the noop, anticipatory, deadline and cfq schedulers are available for sda, and the brackets indicate that the cfq scheduler is currently selected.

The way to change it would be: (again substituting sda for the USB device)

Code:

# echo anticipatory > /sys/block/sda/queue/scheduler

You need to run this as root for every block device you wish to change.

### end quoted ###

This appears to have fixed uncertains usb drive, but not his other drives.

NB: uncertain discovered that other devices/partitions - not just usb - were affected. I have found the same - having been clued to check that by the thread. My write speed copying a file to the boot filesys is 1.5MB/s - usb 1.1 speeds, and this is the native boot HDD, NOT a USB device.

rkelsens opening suggestion does not work for me. It worked for uncertains USB HDD, but not his other partitions when the question became moot - a kernel upgrade fixed the issues for him.

At this point the thread was closed (28 july 2009 - a month ago)

I have upgraded to 2.6.30-02063003-generic (intel graphics chipset issues - largely resolved)

Last edited by scitobor; 09-02-2009 at 11:13 PM.
 
Old 09-09-2009, 10:35 PM   #4
scitobor
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Update and maybe bump

Posting this in case anybody gets here.

In my case the situation is a lot more complex than it looks: The root of the trouble is a cheap/failing USB2.0 HDD enclosure.

On windows XP the faulty enclosure mounts fine and write speeds of 10MB/s are seen.

On ubuntu jaunty the faulty enclosure mounts with some retries (dmesg) and slow writes of a few MB/s falling to 1.5MB/s steady-state are seen.

Thats on a good day. On a bad day:

On windows XP the faulty enclosure mounts fine (though it seems to take a sec or so longer); but is no longer discovered at XP startup. It has to be unplugged-replugged to be mounted.

On ubuntu, the device is discovered but no longer recognised. dmesg shows several failed mount attempts. force mount and fixntfs cannot be made to work as it fails to have an sdb mount assigned to it. It is not seen as any kind of storage.

This was discovered by swapping HDDs between two USB2.0 enclosures. The "faulty" enclosure exhibits the same behaviour with either HDD, and the other enclosure works just fine, no ntfs dirty bits or anything.

This all became clear on a bad day for the enclosure. What makes this difficult to figure is that once the bad enclosure has been plugged in and written to at it's slow speeds, then the good enclosure is written to at that slow speed as well. A restart is necessary to get it back up to speed.

NB: The good enclosure gives write speeds of 17-18 MB/s, much better than windows.

Looking at dmesg, I see the optical mouse being lost and rediscovered with "(EMI?)" in the message. This is with the faulty enclosure, so there may be a lot of noise coming from this unit. That would pretty much explain everything, except why it works at all

I hypothesize that the usb driver falls back to slow speeds, maybe even 1.1 mode, in the presence of a lot of errors (noise), but makes no attempt to recover performance if the noise source is removed. There is no indication of this process in dmesg.

Presumably dmesg is to do with discovery and termination. Is there another log I can look at telling me about ongoing state changes in the USB drivers?

Last edited by scitobor; 09-09-2009 at 10:39 PM.
 
  


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
Slow USB write speeds. uncertain Linux - Hardware 67 07-27-2009 11:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:58 PM.

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