Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] usb storage transfer is very slow

2 views
Skip to first unread message

Michal Kurgan

unread,
Aug 29, 2005, 11:20:07 AM8/29/05
to
Hello!
Recently i spotted that my usb flash memory work very slow, about 5kB/s on
write. On internet search i discover that it's problem with new kernel
(2.6.12) and "sync" mount option, that is now correctly(?) respected by fat
filesystem.
This is my case, but i want to have sth like sync when using removable
devices, is there any option to do this? I much prefer that i see that sth is
copied, not only then when i will try unmount device (in this case i don't
know if there are any problems, earlier with sync i saw transfer rate, and
this is what i want)
--
Michal Kurgan
--
gento...@gentoo.org mailing list

Neil Bothwick

unread,
Aug 29, 2005, 2:20:10 PM8/29/05
to
On Mon, 29 Aug 2005 17:11:04 +0200, Michal Kurgan wrote:

> Recently i spotted that my usb flash memory work very slow, about 5kB/s
> on write. On internet search i discover that it's problem with new
> kernel (2.6.12) and "sync" mount option, that is now correctly(?)
> respected by fat filesystem.

Make sure you haven't enabled BLK_DEV_UB in your kernel.

--
Neil Bothwick

If a program is useless, it must be documented.

Michal Kurgan

unread,
Aug 29, 2005, 3:30:12 PM8/29/05
to
On Monday 29 of August 2005 20:14, Neil Bothwick wrote:
> Make sure you haven't enabled BLK_DEV_UB in your kernel.
I am sure.

Alvin A ONeal Jr

unread,
Aug 29, 2005, 4:10:06 PM8/29/05
to
are you accessing it as /dev/sda or /dev/uba?

Ever since the new "usb-block device" option has been in the kernel I've
noticed this as well. I don't believe it has anything to do with the
sync option, but I have been known to be wrong.

I can't remember off the top of my head, but if you check the "help" in
the kernel configuration (make menuconfig) it gives you a warning or
tells you which option is better.

--
8^)
Laterz-
~Alvin
http://CoolAJ86.Havenite.net

---
Yeah you do!

coolaj86.vcf

Michal Kurgan

unread,
Aug 29, 2005, 5:10:08 PM8/29/05
to
On Monday 29 of August 2005 22:02, Alvin A ONeal Jr wrote:
> are you accessing it as /dev/sda or /dev/uba?
>
> Ever since the new "usb-block device" option has been in the kernel I've
> noticed this as well. I don't believe it has anything to do with the
> sync option, but I have been known to be wrong.
>
> I can't remember off the top of my head, but if you check the "help" in
> the kernel configuration (make menuconfig) it gives you a warning or
> tells you which option is better.

I use usb storage driver, with ehci and ohci support and scsi driver...
I don't use Low Performance USB Block Driver, i never use it.

i acces through "/dev/usb/usbdrive" hand made udev link :-), but this is only
symlink to "sd?"

When i mount by hand without sync my flash work as usual but it start writing
on umnount command, this is not what i want...

Also i use hald with kdemedia kioslave, by default it uses "sync" option.

Neil Bothwick

unread,
Aug 29, 2005, 8:10:18 PM8/29/05
to
On Mon, 29 Aug 2005 23:03:37 +0200, Michal Kurgan wrote:

> When i mount by hand without sync my flash work as usual but it start
> writing on umnount command, this is not what i want...

I can confirm the same here, with gentoo-sources-2.6.12-r9.

Copying a 96MB file to a usb stick and then unmounting it takes just
under 2 minutes with async and over 48 minutes with sync.


--
Neil Bothwick

Compatible: Gracefully accepts erroneous data from any source.

Miroslav Flídr

unread,
Aug 30, 2005, 2:20:11 AM8/30/05
to
Michal Kurgan napsal(a):

This behaviour is caused by change in the vfat driver. It now respects
the sync option and the slow speed is caused by frequent updating of the
FAT table. Some info can be found here:
http://readlist.com/lists/vger.kernel.org/linux-kernel/22/111748.html

The only solution seem to be to use the async option.

--
Miroslav Flídr

--
gento...@gentoo.org mailing list

Michal Kurgan

unread,
Aug 30, 2005, 8:00:18 AM8/30/05
to
On Tuesday 30 of August 2005 08:11, Miroslav Flídr wrote:
> This behaviour is caused by change in the vfat driver. It now respects
> the sync option and the slow speed is caused by frequent updating of the
> FAT table. Some info can be found here:
> http://readlist.com/lists/vger.kernel.org/linux-kernel/22/111748.html

Exactly this is the problem... so sync every sector.
I have one question, how this work earlier? With sync i know when files where
copied in realtime, not after the umount command (there is info that fat
filesystem ignore sync option, then why it works differently with and
without).

>
> The only solution seem to be to use the async option.

But this makes copy process to be done at umount, also i don't see then data
copy rate so i even don't know if there are no problems.

Most suprising is that on gentoo we use hald, by default it uses "sync"
option, as in my case. Whe developers made such big change and don't inform
anyone about this. Yes , there are some info but only in bugzillas reports by
users who spotted it.

So where will by default it will work flawless...
In my opinion current situation is quite dangerous, it can even destroy flash
memory with fat fs (are there other fs widely used in portable hardware?), by
constan overwrite of fat filetable.
> --
> Miroslav Flídr

Miroslav Flídr

unread,
Aug 30, 2005, 9:30:19 AM8/30/05
to
Michal Kurgan napsal(a):

> Exactly this is the problem... so sync every sector.
> I have one question, how this work earlier? With sync i know when files where
> copied in realtime, not after the umount command (there is info that fat
> filesystem ignore sync option, then why it works differently with and
> without).

IMHO the old behaviour was that it synchronized the files and only upon
unmount the FAT table.

> Most suprising is that on gentoo we use hald, by default it uses "sync"
> option, as in my case. Whe developers made such big change and don't inform

I think all major distros so far use sync.

> anyone about this. Yes , there are some info but only in bugzillas reports by
> users who spotted it.

Yes there is not many info about this problem. When I encountered the
problem I lost many hours looking for the cause and solution of the problem.

> So where will by default it will work flawless...

I doubt that it will be changed in the near future :(.

Michal Kurgan

unread,
Aug 30, 2005, 4:20:08 PM8/30/05
to
On Tuesday 30 of August 2005 15:21, Miroslav Flídr wrote:
> Michal Kurgan napsal(a):
> > Exactly this is the problem... so sync every sector.
> > I have one question, how this work earlier? With sync i know when files
> > where copied in realtime, not after the umount command (there is info
> > that fat filesystem ignore sync option, then why it works differently
> > with and without).
>
> IMHO the old behaviour was that it synchronized the files and only upon
> unmount the FAT table.

Then why i saw difference?
But better not to try know too much...

> > So where will by default it will work flawless...
>
> I doubt that it will be changed in the near future :(.

I hope not.

0 new messages