Re: Problem with an external usb HD - slow usb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-03-08 at 12:16 -0300, Luigi Castro Cardeles wrote:
> Hi list and Patrick,
> 
> 
> the default max_sectors is 240. I change this to 1024 like you said
> but the problem continue.
> 
> 
> If i try the speed:
> 
> 
> time dd if=/dev/sdc1 of=/dev/null bs=1M count=5
> i get that speed: 972 MB/s
> 
> 
> but if i run rsync, the upload transfer rate is very slow ( begins at
> 4MB/s and goes below until 0.7KB/s)

[Please don't top-post on this list]

First of all, is this device a real hard disk, i.e. a mechanically
rotating magnetic surface, or is it some kind of Flash drive?

If it's the latter, then read on.

I've been looking into this recently because of wildly varying
performance when writing to a pendrive. It turns out that Flash memory
isn't "really" random access when it comes to writing (reading is OK
though). Quick summary:

The Flash technology only allows writing zeroes, not ones, and is
organized in blocks of say 128 or 512 bytes (this varies according to
manufacturer) so to write some binary data in the middle of an existing
block the procedure is:

1) Read the entire block to some short-term scratch memory
2) Reset the block to all 1's.
3) Modify the scratch memory with the new bits
4) Copy the 0 bits of the scratch to the Flash block

(all this happens inside the drive of course; AFAIK it's not visible
even at the level of the kernel driver).

This process takes a very long time, and when you're repeatedly writing
small amounts of data (e.g. to update a directory) it all has to be done
multiple times, even for the same drive block. A few days ago I copied a
2GB file to an existing VFAT filesystem on an 8GB pendrive, reputedly
one of the fastest on the market. It took over two hours. I then tried
just simply copying the data directly to the drive using 'dd' (i.e. no
filesystem). It finished in under 5 minutes.

BTW, rsync is a killer on these drives because it adds another layer of
reading and hashing. In this particular case it's a false economy.

poc


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux