luc1970
Posts: 5
Joined: Mon Aug 12, 2019 5:48 am

File transfer speed with the Pi4

Mon Aug 19, 2019 6:56 pm

I wonder what file transfer speed one could expect with the new Pi4 and its USB3 ports. If two HDDs or USB sticks are plugged into the USB3 ports, has anyone measured the file transfer speed from one to the other ?

User avatar
rpdom
Posts: 15014
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 7:11 pm

A maximum of 2Gb/s in theory, although it will likely be less than that.

User avatar
clicky
Posts: 332
Joined: Thu Oct 25, 2012 7:34 am

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 7:14 pm

Code: Select all

$ sudo hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 852 MB in  3.00 seconds = 323.61 MB/sec
Does this tell you anything?

BTW 323.61 Mbytes per second is 2588.88Mbit per second...

ejolson
Posts: 3423
Joined: Tue Mar 18, 2014 11:47 am

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 7:16 pm

clicky wrote:
Mon Aug 19, 2019 7:14 pm

Code: Select all

$ sudo hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 852 MB in  3.00 seconds = 323.61 MB/sec
Does this tell you anything?

BTW 323.61 Mbytes per second is 2588.88Mbit per second...
Right, so if copying from one device to the other, one would expect a total throughput of about half or 1294.44 Mbit per second.

User avatar
rpdom
Posts: 15014
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 7:22 pm

ejolson wrote:
Mon Aug 19, 2019 7:16 pm
Right, so if copying from one device to the other, one would expect a total throughput of about half or 1294.44 Mbit per second.
Not quite. It depends on the speed of the slowest device involved as well.

Writing is slower than reading.
Short burst writes will use the device's internal cache, so will run at the best speed the device/host bus can handle.

Sustained writes will run as fast as the device being written to can handle unless the bus speed is slower.
Last edited by rpdom on Tue Aug 20, 2019 2:29 am, edited 1 time in total.

luc1970
Posts: 5
Joined: Mon Aug 12, 2019 5:48 am

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 9:08 pm

Well thats all theory, in my first try I had something like 20MBytes/sec, which is not much. With the same disks on my mac I have around 150MBytes/sec, so I was wondering what people were experiencing in reality...
All huge files btw, not thousands of small ones.

User avatar
RaTTuS
Posts: 10415
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 9:18 pm

what devices ,
how are you measuring ?
post URL's to all
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

luc1970
Posts: 5
Joined: Mon Aug 12, 2019 5:48 am

Re: File transfer speed with the Pi4

Mon Aug 19, 2019 9:39 pm

Well I copied 16GB of movies in 14min from one to the other, which gives around 20MByte/sec. HDDs are Seagate Freeagent Goflex https://www.storagereview.com/seagate_g ... tac4000100. On my mac, they are about 7x faster.

ejolson
Posts: 3423
Joined: Tue Mar 18, 2014 11:47 am

Re: File transfer speed with the Pi4

Tue Aug 20, 2019 12:02 am

luc1970 wrote:
Mon Aug 19, 2019 9:39 pm
Well I copied 16GB of movies in 14min from one to the other, which gives around 20MByte/sec. HDDs are Seagate Freeagent Goflex https://www.storagereview.com/seagate_g ... tac4000100. On my mac, they are about 7x faster.
In that case you will want to read the following thread:

https://www.raspberrypi.org/forums/view ... 8&t=245931

User avatar
clicky
Posts: 332
Joined: Thu Oct 25, 2012 7:34 am

Re: File transfer speed with the Pi4

Tue Aug 20, 2019 6:47 am

Code: Select all

$  ls -la big_file 
-rw-r--r-- 1 pi pi 10878393190 Aug 20 07:41 big_file
$ time cp big_file big_file2 

real	1m38.212s
user	0m0.114s
sys	1m8.833s
10878393190 bytes / 98s = 111004012 which is 105MB/s

So, yes, 150MB or less is realistic.

Return to “General discussion”