Re: tar a flash drive

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

 



On Wed, 2019-09-04 at 12:44 -0700, Gordon Messmer wrote:
> On 9/4/19 8:20 AM, Patrick O'Callaghan wrote:
> > For a USB drive it probably doesn't make much difference. Output will
> > be buffered and speed is limited by the USB interface.
> 
> If you aren't specifying a block size, the default block size tends to 
> involve more round-trips through the kernel and through the USB bus.  In 
> that case, it isn't the USB interface bandwidth that causes slow 
> transfers, but the latency involved in each tiny request.
> 
> I'd test this, but I seem to have left my bag of USB drives at home 
> today.  :)
> 
> Feel free to 'dd' a drive to /dev/null with and without a specified 
> large block size to demonstrate the difference.  Maybe I'm wrong.

This is for an otherwise unused 4.5GB partition on an SSD. The CPU is
an i7-3770 with 8GB of RAM:

[poc@bree ~]$ sudo time dd if=/dev/sda2 of=/dev/null
8787968+0 records in
8787968+0 records out
4499439616 bytes (4.5 GB, 4.2 GiB) copied, 11.925 s, 377 MB/s
4.48user 7.26system 0:11.92elapsed 98%CPU (0avgtext+0avgdata 2092maxresident)k
8787968inputs+0outputs (0major+89minor)pagefaults 0swaps
[poc@bree ~]$ sudo time dd bs=4096 if=/dev/sda2 of=/dev/null
1098496+0 records in
1098496+0 records out
4499439616 bytes (4.5 GB, 4.2 GiB) copied, 8.42924 s, 534 MB/s
0.59user 2.43system 0:08.43elapsed 35%CPU (0avgtext+0avgdata 2216maxresident)k
8788104inputs+0outputs (2major+89minor)pagefaults 0swaps

(increasing the block size to 10MB gets 549 MB/s, i.e. almost no difference)

Given that the (theoretical) speed of USB-2 is 60 MB/s, the drive would
be a bottleneck in both cases. For USB-3 (10 or 20 times faster,
depending on version) there would be a difference.

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux