You are not logged in.

#1 2005-02-07 15:37:57

xerverius
Member
From: ~
Registered: 2004-11-02
Posts: 230
Website

Why is USB much faster in Linux?

10 mins ago i copied 615 files (2.2 MB) on my usb drive in WIndows XP, it took about 6 mins  :x
When i copied the files back to my harddrive in linux.....10 Seconds.
Can someone explain why linux is much much faster then Windows?

ps. pendrive is 128MB usb 1.1

Offline

#2 2005-02-07 16:26:26

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Why is USB much faster in Linux?

Writing a flashdisk is very slow, reading it however...

Also, if you have a stupid on-access virusscanner, then your flashdisk becomes really slow too.

Offline

#3 2005-02-07 16:44:27

xerverius
Member
From: ~
Registered: 2004-11-02
Posts: 230
Website

Re: Why is USB much faster in Linux?

I'm not running a virus scanner, but it seems that writing to usb in linux is also much faster.

Well, another reason to use linux ghehe

Offline

#4 2005-02-07 17:00:07

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Why is USB much faster in Linux?

I've noticed this aswell, although I suspected Linux of cheating: copying the files would go instantly but when I looked at the pendrive, I saw the LED flashing minutes after the copying was done. Obviously, I couldn't unmount the drive since data was still being written.

I had this behaviour with Gentoo Linux using the Gentoo filemanager. I can't remember if it happen all the time or with a specific version of the kernel/the filemanager/something else. Now with Arch, it never happens and when the filemanager says the copying is done, it's really done.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#5 2005-02-07 17:11:03

vicious
Member
Registered: 2004-11-09
Posts: 113

Re: Why is USB much faster in Linux?

This is true. I experienced this with floppies.
The fact is that windows doesn't cache anything and writes each file separately.
Linux writes eveything in one go, so it's much faster.

Offline

#6 2005-02-07 17:39:15

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Why is USB much faster in Linux?

If you want the same behaviour as in Windows (slow but can pull it out almost always), use the sync mount option.

Offline

#7 2005-02-07 17:43:03

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: Why is USB much faster in Linux?

You should use (dir)sync option(s) to ensure the data is properly written.

A line from my /etc/fstab:

/dev/sdb1              /mnt/usbstick vfat      umask=0,users,noauto,sync,dirsync 0 0

[it doesn't necessarily work as I would like to (overall), but sync does its job]

Offline

#8 2005-02-07 19:49:42

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Why is USB much faster in Linux?

does this only work for flash drives or can other devices use it as well?

Offline

#9 2005-02-07 20:15:51

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: Why is USB much faster in Linux?

I get about 1 MB /sec from USB2 512M pendrives

/dev/rd512 /mnt/rd512 auto rw,user,noauto,noatime,sync,dirsync,defaults 0 0

It uses reiserfs, and that timing was done before sync-dirsync was added to fstab. ( thanks IceRAM )
Another useful option is auto, I have some 128M drives and some 512, with VFAT on the 128's This means they all mount no problems. However my camera is not so lucky, it gets about 100KB
Yes, you can use sync options anywhere they make sense. For example, an isofs can not use them.


--(*(cs25x--));

Offline

#10 2005-02-07 20:19:49

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: Why is USB much faster in Linux?

I don't know.
USB flashdrives (usbsticks) can be considered removable media and I think I should not be missinformed when a write operation completes.

Offline

#11 2005-02-07 20:33:00

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,325

Re: Why is USB much faster in Linux?

for dynamic fstab you could also use dbus and hal.
in combination with new kde beta or gnome you get all out of it (dbus/hal).

Offline

#12 2005-02-10 13:44:47

jerem
Member
From: France
Registered: 2005-01-15
Posts: 310

Re: Why is USB much faster in Linux?

Type :

sync

and all the data actually in cache will be written to the drives.

Offline

Board footer

Powered by FluxBB