TheRadziu
Posts: 18
Joined: Thu Jan 14, 2016 3:08 pm
Location: Poland

Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Fri Jun 28, 2019 1:49 pm

I just set up fresh Rasbian on my new Raspberry Pi 4, set up USB Hard drive (EXT4) and samba shared it and I'm getting the same speeds as I did on Raspberry pi 2b, which is 10,4Mb/s, and I do believe it should be around few times higher for Rpi4 with its new hardware and ports.

I do suspect either my windows SMB settings (I remember changing some when they disabled smb protocol in one of the w10 updates) or more likely stock samba settings (all I did was hide lost+found in global settings and add 3 shares). I'm also getting same speeds when writing to the directory on microsd itself.


Any help improving smb speeds? Thanks.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24660
Joined: Sat Jul 30, 2011 7:41 pm

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Fri Jun 28, 2019 1:53 pm

Probably preaching to the converted, but you do have the drive plugged in to one of the blue sockets? Those are the USB 3 ones.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

TheRadziu
Posts: 18
Joined: Thu Jan 14, 2016 3:08 pm
Location: Poland

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Fri Jun 28, 2019 1:58 pm

Yes I do.

hdparm test of drive itself:

Code: Select all

 Timing cached reads:   1766 MB in  2.00 seconds = 883.26 MB/sec
 Timing buffered disk reads: 296 MB in  3.02 seconds =  98.02 MB/sec
And write speed

Code: Select all

1073741824 bytes (1.1 GB, 1.0 GiB) copied, 9.85833 s, 109 MB/s

ferofero33
Posts: 2
Joined: Sat Jun 29, 2019 1:23 pm

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jun 29, 2019 1:27 pm

Same issue here with RPi4 - both samba and FTP transfers are ~10MB/s, while external drive connected using USB3 is capable ~100MB/s.
I've replaced 2months old 3B+ with 4 to get better samba speeds (USB3+GbpsLAN+faster CPU), but I'm quite dissapointed.

Any idea ?

TheRadziu
Posts: 18
Joined: Thu Jan 14, 2016 3:08 pm
Location: Poland

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jun 29, 2019 3:05 pm

ferofero33 wrote:
Sat Jun 29, 2019 1:27 pm
Same issue here with RPi4 - both samba and FTP transfers are ~10MB/s, while external drive connected using USB3 is capable ~100MB/s.
I've replaced 2months old 3B+ with 4 to get better samba speeds (USB3+GbpsLAN+faster CPU), but I'm quite dissapointed.

Any idea ?
I solved my issue, kinda ashamed to admit it, but maybe it could help you out.
So, it was because PC was going through 100Mbps switch. I've noticed it when checked PC eth interface and it reported 100Mbps connection speed. Connecting both rpi and pc directly to the router improved my samba speeds from 10-12mb/s to 60Mb/s (on heavy cpu load) - 90Mb/s (on idle).

Make sure everything that is between rpi and pc is 1Gbit rated, that includes PC's ethernet (either mobo or dedicated card), router and/or switch and probably cables too.

CrunkTrunk
Posts: 2
Joined: Mon Jul 01, 2019 12:40 pm

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Mon Jul 01, 2019 12:55 pm

I'm running into the same issue though my transfer speeds, from share to windows hard drive, are only ~5 MBps

I'm running RPI4 connected via eithernet to router and have a USB 3.0 NTFS drive mounted (WD 4 tb passport).

My windows computer is connected to the router via 5g wifi, this is considerably slower than a ethernet cable to router but running a cable is not an option because I'm on the second floor.

edit: After pulling a network cable from my router to my pc upstairs samba will do 50 Mbps transfers
unfortunately this isn't an option so I changed wifi channel to speed up wifi and that got me to ~8 MBps.

Anyone have any other suggestions I can try to increase speed? was really hoping to get more throughput

christopholous
Posts: 14
Joined: Sat Jul 06, 2019 1:51 am

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jul 06, 2019 1:59 am

Hi,

I have had success at getting between 70-90 MB/s transfer speeds on a 2.5" 5200 rpm drive, for large files. With peak speeds at over 100MB/s using a samba server.

Make sure your CPU isn't throttling. Mine transfers files at around 59C. Buy some heat sinks if you haven't. If you are using the case that came with the RPI, throw it away. You can get ones with fans that allow lots of air flow for $10 on Amazon.
Last edited by christopholous on Sat Jul 06, 2019 7:28 pm, edited 1 time in total.
Your mother is so fat, the recursive function computing her mass causes a stack overflow.

christopholous
Posts: 14
Joined: Sat Jul 06, 2019 1:51 am

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jul 06, 2019 5:10 pm

Hi, I wanted to add one more thing.

I formatted my drives as NTFS and got 30MBps transfer speeds :shock: :shock:

Put the drives back to ext3 and I"m getting 90MBps (for large files) 8-)

So I guess the survey says, avoid using NTFS if you want fast transfers and use ext3 instead.

Edit:

I switched from ext3 to ext4 and now I'm consistently getting 112MB/s transfers of large files!!! woohoooo

So to revise what I said before: avoid using NTFS if you want fast transfers and use ext4 instead.
Last edited by christopholous on Sat Jul 06, 2019 10:53 pm, edited 1 time in total.
Your mother is so fat, the recursive function computing her mass causes a stack overflow.

CrunkTrunk
Posts: 2
Joined: Mon Jul 01, 2019 12:40 pm

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jul 06, 2019 5:14 pm

Thanks for the suggestions,

I will try
-formatting my hard drive to EXT4 and see if there is a performance difference.
- use a poe hat with fan to counter thermal throttling.

Cheers!

User avatar
DougieLawson
Posts: 36867
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jul 06, 2019 5:34 pm

christopholous wrote:
Sat Jul 06, 2019 5:10 pm
Hi, I wanted to add one more thing.

I formatted my drives as NTFS and got 30MBps transfer speeds :shock: :shock:

Put the drives back to ext3 and I"m getting 90MBps (for large files) 8-)

So I guess the survey says, avoid using NTFS if you want fast transfers and use ext3 instead.
That's the difference between a Linux native filesystem kernel driver (ext4) and an alien filesystem driver (ntfs). It really is doing three times the work for each file block read from the drive.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

christopholous
Posts: 14
Joined: Sat Jul 06, 2019 1:51 am

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sat Jul 06, 2019 10:54 pm

Aaand I switched from ext3 to ext4, now I'm saturating the gigabit connection. Getting 112MB/s transferring large files. :)
Your mother is so fat, the recursive function computing her mass causes a stack overflow.

AmigaGamer
Posts: 94
Joined: Sat Feb 01, 2014 9:02 pm

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sun Jul 07, 2019 2:36 pm

Another thing that can really affect the performance is the way you mount the Samba filesystems.

on my desktop PC running Buster i can only get about 40-50mb/s if the filesystem is mounted in at user level (gvfs-fuse)
e.g. through File managers or comand line

Code: Select all

gio mount smb://user@server/share
however if i mount via fstab or a traditional mount line i get a full gigabit transfer rates with a lower cpu overhead , e.g "

Code: Select all

sudo mount -t cifs -o ro username=USER,uid=$(id -u),gid=$(id -g) //server/share /home/pi/SAMBAshare"

mechwarrior
Posts: 5
Joined: Sat Mar 14, 2015 8:53 am

Re: Slow samba transfer speed on RPi4 to a usb 3.0 drive (10,4mb/s)

Sun Oct 27, 2019 12:19 pm

hi guys, even with an ext4 formatted drive connected through usb3 to pi4b, gigabit connection to router, then gigabit connection to pc, I still cannot breach 10mb/s tranfers speeds on samba share. I have raspbian buster loaded (waiting for osmc) .

Return to “Beginners”