You are not logged in.

#1 2007-05-24 00:57:11

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

[resolved] Sandisk USB very slow for writes, fast for reads

On my IBM Thinkpad T43p my brand new Sandisk Titanium 2GB is really slow.  I copied a 350MB file to the drive and it only copied 21MB in 30 minutes.

Is there anything I can do to make it go faster?  On my Windows box it took only 1.5 minutes to copy the same 350MB file.

Last edited by jason (2007-05-24 17:54:19)

Offline

#2 2007-05-24 09:52:52

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: [resolved] Sandisk USB very slow for writes, fast for reads

Is there anything I can do to make it go faster?

Yes, find the problem and fix it. this isn't normal ie, lets just make it go faster.

What have you ascertained so far apart from its as slow as p*ss?
What other info can you give apart from the windows box is (probably) handling it ok and the thinkpad/titanium isn't.

some ideas;
Did it do this as a one-off or is it always slow?  what did you use to copy the file? what usb system have you software wise on the laptop? what usb modules?
did it go at uniform speed, or go quick then slow to a crawl? was anything else taking up cpu/memory/ports?

Has the file or filesystem  on the SD been corrupted? ie did you remove the drive from windows without using the "safely remove hardware" button? Did you move instead of copy?

also, simple as it seems,  maybe check the connection. its reported that the titanium models can be awkward to fit, ie wiggly.

Offline

#3 2007-05-24 13:24:03

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

Re: [resolved] Sandisk USB very slow for writes, fast for reads

When copying to the device it is very slow.  Copying from the device is fast.

$ time cp /mnt/usb1/lol.avi ~

real    0m27.008s
user    0m0.028s
sys    0m2.232s

$ time cp lol.avi /mnt/usb1

real    1m51.135s
user    0m0.012s
sys    0m0.044s

I interrupted that one after it only copied 1.4MB.

$ lsmod | grep usb
usb_storage            78656  1
usbserial              29704  1 ftdi_sio
usbcore               111752  6 usb_storage,ehci_hcd,uhci_hcd,ftdi_sio,usbserial
ide_core              111688  2 usb_storage,generic

The filesystem should be okay.  fsck.vfat gives no errors.

I've tried both usb slots and a change did not help and it also seems unlikely that it was a physical problem since the reading is fine.

Thanks for asking for more information.

Offline

#4 2007-05-24 15:01:00

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [resolved] Sandisk USB very slow for writes, fast for reads

I can piss quite fast...seems a strange measure of speed....

Offline

#5 2007-05-24 15:32:56

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

Re: [resolved] Sandisk USB very slow for writes, fast for reads

Yeah I guess it's all relative.

Offline

#6 2007-05-24 17:11:38

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: [resolved] Sandisk USB very slow for writes, fast for reads

i avoided the obvious fast piss comment smile ..... maybe the lappie is usb 1.1. for that  i think you need the ohci_hcd modules ... if its any help, heres my grep

lsmod | grep usb
usb_storage            78656  0
ide_core              111688  2 amd74xx,usb_storage
usbhid                 36128  0
hid                    24448  1 usbhid
ff_memless              5256  1 usbhid
usbcore               111752  6 uhci_hcd,usb_storage,usbhid,ohci_hcd,ehci_hcd



edit:
have you got hwd in your rc.conf DAEMONS line ?

Last edited by Kern (2007-05-24 17:18:35)

Offline

#7 2007-05-24 17:38:22

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

Re: [resolved] Sandisk USB very slow for writes, fast for reads

I added hwd and it didn't help.  Pretty sure that machine is a USB 2.0 machine.

Last edited by jason (2007-05-24 17:40:46)

Offline

#8 2007-05-24 17:54:06

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

Re: [resolved] Sandisk USB very slow for writes, fast for reads

Looks like the automounting stuff mounts as sync instead of async.  That's why it was so slow writing.

Offline

#9 2007-05-24 19:47:13

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: [resolved] Sandisk USB very slow for writes, fast for reads

well done, and thanks for feeding back. benefits others smile

Offline

#10 2007-05-25 15:28:53

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [resolved] Sandisk USB very slow for writes, fast for reads

turn on async for usb writes

Offline

#11 2007-05-27 15:30:51

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: [resolved] Sandisk USB very slow for writes, fast for reads

...or better "flush" if it's a vfat partition.

Offline

#12 2007-05-27 16:14:22

jason
Member
From: /dev/null
Registered: 2003-01-13
Posts: 102

Re: [resolved] Sandisk USB very slow for writes, fast for reads

Why is flush better than async?

Offline

#13 2007-05-28 13:02:52

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: [resolved] Sandisk USB very slow for writes, fast for reads

This a new option for external usb devices formatted as vfat. According to the kernel changlog:

FAT: Add "-o flush" mount option for fat for removable media devices (USB flash-based memory devices, MP3 players). Mounting with -o flush tells FAT to write things to disk as quickly as possible. It is like -o sync, but much faster (and not as safe). Think of it like a fast "async" mount

This means that it works like async + automatic sync command on the copying process end. No files are left in the cache so you can safely unplug the device (even without umount). I'm using it for some time for udev automounting and it's working really well. You can search for flush in the forums for more examples but I suggest you to change async to flush and copy some files so you'll just see how it works. If you use midnight commander for copying you'll notice that copying dialog will stay on at the 100% for some time (until the file is really written on the usb device). IMO there is no difference in copying speed between async and flush and you don't have to remember about sync+umount so it's also safer.

Offline

Board footer

Powered by FluxBB