View previous topic :: View next topic |
Author |
Message |
MadEgg l33t
Joined: 06 Jun 2002 Posts: 678 Location: Netherlands
|
Posted: Mon Oct 10, 2005 11:56 am Post subject: [USB] USB-stick at low speed |
|
|
I've got an USB-stick/MP3 player(X-Micro Easy MP3 Player, which, according to the specs should support high-speed transfers at 480 MBit, but when I copy files to it the speed is only about 240 KiB/s according to KDE's file transfer dialog, while USB2 should be able to transfer about 50 MiB/s, and the USB stick according to the website should be able to write at 6 MiB/s, so I'm not getting anywhere near the performance I would expect.
This is what appears in 'dmesg' when I plug my USB-stick in:
Code: |
usb 5-6: new high speed USB device using ehci_hcd and address 6
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
Vendor: X-Micro Model: Easy MP3 Player Rev: 1.06
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sde: 507904 512-byte hdwr sectors (260 MB)
sde: Write Protect is off
sde: Mode Sense: 23 00 00 00
sde: assuming drive cache: write through
SCSI device sde: 507904 512-byte hdwr sectors (260 MB)
sde: Write Protect is off
sde: Mode Sense: 23 00 00 00
sde: assuming drive cache: write through
sde: sde1
Attached scsi removable disk sde at scsi1, channel 0, id 0, lun 0
usb-storage: device scan complete
|
So it actually recognizes it as a high-speed device...
The only thing I can think of is related to another post of mine on this forum; the following appears in my dmesg about EHCI:
Code: |
ehci_hcd 0000:00:1d.7: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller
ehci_hcd 0000:00:1d.7: debug port 1
ehci_hcd 0000:00:1d.7: BIOS handoff failed (104, 01010001)
ehci_hcd 0000:00:1d.7: continuing after BIOS bug...
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
ehci_hcd 0000:00:1d.7: irq 20, io mem 0xf7fffc00
PCI: cache line size of 128 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
|
But it does say that USB 2.0 is initialized, so why doesn't it work? _________________ Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755 |
|
Back to top |
|
|
rukh Apprentice
Joined: 17 Aug 2005 Posts: 177 Location: Sol 3
|
Posted: Mon Oct 10, 2005 1:43 pm Post subject: |
|
|
Hi, did you enable USB 2.0 in your bios? That did it for me. _________________ Prepare to meet your maker! -- Bereiten Sie vor sich, Ihren Hersteller zu treffen!
-- rukh.de, Noir (german) |
|
Back to top |
|
|
MadEgg l33t
Joined: 06 Jun 2002 Posts: 678 Location: Netherlands
|
Posted: Mon Oct 10, 2005 2:53 pm Post subject: |
|
|
Well.... enable? In the BIOS I can choose between FullSpeed and HiSpeed, and I've got it set to HiSpeed, that should be right, right? _________________ Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755 |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
|
Back to top |
|
|
MadEgg l33t
Joined: 06 Jun 2002 Posts: 678 Location: Netherlands
|
Posted: Mon Oct 10, 2005 4:07 pm Post subject: |
|
|
Everything is handled automatically by media:/ KDE IO-slave, udev and the like, but when the stick is mounted, the following line appears in my /etc/mtab file:
Code: |
/dev/sda1 /media/X-MICRO_MP3 vfat rw,nosuid,nodev,sync,noatime,utf8,user=eggie 0 0
|
So, yes it's mounted sync. I know that the copying will appear to go faster when it's mounted async but that will not mean I will be able to unplug my USB stick sooner, will it? _________________ Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755 |
|
Back to top |
|
|
widan Veteran
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Mon Oct 10, 2005 6:33 pm Post subject: |
|
|
MadEgg wrote: | So, yes it's mounted sync. I know that the copying will appear to go faster when it's mounted async |
Not only appear. It will be faster, even including the time to sync the disk (when running async, the kernel is able to buffer things, so I/O is more efficient: if a block is modified ten times, then it will be written only once at the end, and not the other 9 times - and the FAT and the free block maps are modified a lot when writing).
MadEgg wrote: | but that will not mean I will be able to unplug my USB stick sooner, will it? |
Run "sync" before unplugging (or unmount it, or ask KDE to unmount it). Don't unplug it without warning when mounted async, especially if you've just written to it. It's the best way to corrupt the filesystem. |
|
Back to top |
|
|
MadEgg l33t
Joined: 06 Jun 2002 Posts: 678 Location: Netherlands
|
Posted: Tue Oct 11, 2005 7:46 am Post subject: |
|
|
widan wrote: | MadEgg wrote: | So, yes it's mounted sync. I know that the copying will appear to go faster when it's mounted async |
Not only appear. It will be faster, even including the time to sync the disk (when running async, the kernel is able to buffer things, so I/O is more efficient: if a block is modified ten times, then it will be written only once at the end, and not the other 9 times - and the FAT and the free block maps are modified a lot when writing). |
Yes, but what I'm actually trying to do is copy new songs over to my USB Stick. So it's like 12 files of about 3 MiB each. I thought async only mattered much when you're doing a lot of editing or are copying lots of small files over. Anyway, I'd be willing to try(although I doubt that would make the difference between 250 KiB/s and 6 MiB/s, that's like 36 times as slow as I would expect), but I don't have an entry in fstab for it; the stick is mounted in /media automatically. I don't know what is doing that, is it the KDE Media IOSlave, or is it ivman? And where can I configure that to mount it async instead of sync? _________________ Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755 |
|
Back to top |
|
|
widan Veteran
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Tue Oct 11, 2005 9:00 am Post subject: |
|
|
MadEgg wrote: | And where can I configure that to mount it async instead of sync? |
Maybe this ? Or just remount it async after it's mounted ("mount /media/X-MICRO_MP3 -o async,remount"). |
|
Back to top |
|
|
MadEgg l33t
Joined: 06 Jun 2002 Posts: 678 Location: Netherlands
|
Posted: Thu Oct 13, 2005 12:40 pm Post subject: |
|
|
Right, I just tried it, and in fact it does help.
What I tested is this: first I emptied my USB stick and copied 171 MiB over while it was mounted sync. That took 11 minutes, so about 260 KiB/s.
After that I emptied my USB stick, remounted it async and copied it all over again, both using Konqueror. The second time it took 25 seconds, so that's about 6.8 MiB/s, the speed I was expecting.
But I do not believe that this is simply caused by the difference in mounting sync and async, and in fact I like having removable devices mounted sync better, so what is the reason for this enormous difference in speed? Is there any way I can improve my speed while it's mounted sync? _________________ Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755 |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
|
Back to top |
|
|
MadEgg l33t
Joined: 06 Jun 2002 Posts: 678 Location: Netherlands
|
Posted: Thu Oct 13, 2005 5:43 pm Post subject: |
|
|
Right, that explains why it's happening. Now just to wait for a fix Until then I'll have to settle for mounting async... _________________ Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755 |
|
Back to top |
|
|
knirscher n00b
Joined: 25 Aug 2005 Posts: 16 Location: Darmstadt, Germany
|
Posted: Sun Mar 19, 2006 6:18 pm Post subject: |
|
|
Hopefully somebody is still reading this:
I have an external Seagate HDD which is capable of FireWire, USB 2 and USB 1.2.
I experience the same very slow write speeds to the HDD as MadEgg with a USB 2 connection _and_ with a FireWire connection. Ok, this is not surprising, but what surprises me is that I have these slow write speeds even though my HDD is actually formatted ext3. Of course, if I mount it async, i get the full speeds.
Transferring 1.4 GB with async takes about 90 seconds. => 15.000 KB/s
Transferring 67 MB with sync takes about 238 seconds. => 280 KB/s
In the bug report (http://bugzilla.kernel.org/show_bug.cgi?id=4882) they blame the vfat developers. So either I am seeing a different problem here or they are wrong.
Any ideas? |
|
Back to top |
|
|
dsd Developer
Joined: 30 Mar 2003 Posts: 2162 Location: nr London
|
Posted: Sun Mar 19, 2006 6:33 pm Post subject: |
|
|
looks like ext3's sync implementation has the same semantics as the new vfat one.
remember that sync is *supposed* to synchronise as much as it can.
the fact that it synchronises way too much for "sync" to be a sensible option to allow for unplug-without-unmount for flash devices is an entirely separate problem, which hasnt been solved yet. _________________ http://dev.gentoo.org/~dsd |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|