klatox
Posts: 8
Joined: Wed Apr 11, 2018 4:27 am

Extraordinarily slow Samba speed

Mon Apr 19, 2021 4:34 pm

Hi all,

I recently successfully configured a Samba share on my new Pi, however, writing to the share is extremely slow.

The share is a brand new Samsung T7, formatted as ntfs, and connected via USB 3 port.

When writing to the drive from my win10 machine, I’m seeing 2MB/s at the most.

I tested writing to the drive locally from the Pi using the dd command and it gave me 160MB/s.

The Pi is directly connected to my router via a cat6 cable and the WiFi is disabled. My win10 machine is on 5Ghz WiFi.

Any idea what could be wrong?

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

Re: Extraordinarily slow Samba speed

Mon Apr 19, 2021 4:43 pm

klatox wrote:
Mon Apr 19, 2021 4:34 pm
Hi all,

I recently successfully configured a Samba share on my new Pi, however, writing to the share is extremely slow.

The share is a brand new Samsung T7, formatted as ntfs, and connected via USB 3 port.

When writing to the drive from my win10 machine, I’m seeing 2MB/s at the most.

I tested writing to the drive locally from the Pi using the dd command and it gave me 160MB/s.

The Pi is directly connected to my router via a cat6 cable and the WiFi is disabled. My win10 machine is on 5Ghz WiFi.

Any idea what could be wrong?
That looks like a networking problem. What happens when you connect the laptop over wired networking?

klatox
Posts: 8
Joined: Wed Apr 11, 2018 4:27 am

Re: Extraordinarily slow Samba speed

Mon Apr 19, 2021 5:33 pm

ejolson wrote:
Mon Apr 19, 2021 4:43 pm
klatox wrote:
Mon Apr 19, 2021 4:34 pm
Hi all,

I recently successfully configured a Samba share on my new Pi, however, writing to the share is extremely slow.

The share is a brand new Samsung T7, formatted as ntfs, and connected via USB 3 port.

When writing to the drive from my win10 machine, I’m seeing 2MB/s at the most.

I tested writing to the drive locally from the Pi using the dd command and it gave me 160MB/s.

The Pi is directly connected to my router via a cat6 cable and the WiFi is disabled. My win10 machine is on 5Ghz WiFi.

Any idea what could be wrong?
That looks like a networking problem. What happens when you connect the laptop over wired networking?
Good question, unfortunately the win10 machine is a desktop and is in another room entirely, so I’ll have to disconnect everything and test it that way. But this got me thinking, I wonder if there is some
win10 wireless adapter setting or driver issue going on.

hortimech
Posts: 489
Joined: Wed Apr 08, 2015 5:52 pm

Re: Extraordinarily slow Samba speed

Mon Apr 19, 2021 7:03 pm

klatox wrote:
Mon Apr 19, 2021 4:34 pm
The share is a brand new Samsung T7, formatted as ntfs, and connected via USB 3 port.
There are problems with rpi's and some USB3 connected drives, could this drive be one ?
However, the main problem is probably the filesystem, NTFS is for Windows, you will get better performance with a Linux filesystem, ext4 for instance.

LTolledo
Posts: 5129
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Extraordinarily slow Samba speed

Mon Apr 19, 2021 9:04 pm

NTFS + Samba is SLOW!!
EXT4 + Samba is FASTER!

and as stated by hortimech above, a certain combination of hardware will also degrade performance.
some files WILL show slow transfer rate, even with EXT4 + Samba, and with the right hardware combination

on the image below, the transfer was made using a single 5GB mkv file
the hardware were:
1. bare Seagate Baracuda 2TB drive, one formatted NTFS and the other EXT4 (connected one at a time)
2. Eluteng blue SATA to USB3.0 adapter cable, connected to the USB3.0 port of RPi4B
3. microSD-boot RPi4B-4GB with RPiOS32 Lite and Samba, Ethernet LAN connection.
4. the w$10 connection is also via Ethernet LAN
w10 to RPi4B-4G samba share file transfer spinning rust NTFS.jpg
w10 to RPi4B-4G samba share file transfer spinning rust NTFS.jpg (17.74 KiB) Viewed 144 times
w10 to RPi4B-4G samba share file transfer spinning rust EXT4 .jpg
w10 to RPi4B-4G samba share file transfer spinning rust EXT4 .jpg (17.17 KiB) Viewed 144 times


there was another forum member who had problem with slow samba transfer rate....
the forum member was using a certain Seagate Backup unit.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

klatox
Posts: 8
Joined: Wed Apr 11, 2018 4:27 am

Re: Extraordinarily slow Samba speed

Mon Apr 19, 2021 9:54 pm

LTolledo wrote:
Mon Apr 19, 2021 9:04 pm
NTFS + Samba is SLOW!!
EXT4 + Samba is FASTER!

and as stated by hortimech above, a certain combination of hardware will also degrade performance.
some files WILL show slow transfer rate, even with EXT4 + Samba, and with the right hardware combination

on the image below, the transfer was made using a single 5GB mkv file
the hardware were:
1. bare Seagate Baracuda 2TB drive, one formatted NTFS and the other EXT4 (connected one at a time)
2. Eluteng blue SATA to USB3.0 adapter cable, connected to the USB3.0 port of RPi4B
3. microSD-boot RPi4B-4GB with RPiOS32 Lite and Samba, Ethernet LAN connection.
4. the w$10 connection is also via Ethernet LAN

w10 to RPi4B-4G samba share file transfer spinning rust NTFS.jpg
w10 to RPi4B-4G samba share file transfer spinning rust EXT4 .jpg



there was another forum member who had problem with slow samba transfer rate....
the forum member was using a certain Seagate Backup unit.
As a test I tried a USB flash drive formatted as ext4 and it was also extremely slow, probably just as slow as the ntfs share.

I also tried formatting my T7 as ext4 and I'm actually getting worse speeds than with ntfs...less than 1MB/s over both samba and sftp
Last edited by klatox on Tue Apr 20, 2021 6:58 am, edited 2 times in total.

klatox
Posts: 8
Joined: Wed Apr 11, 2018 4:27 am

Re: Extraordinarily slow Samba speed

Tue Apr 20, 2021 3:28 am

hortimech wrote:
Mon Apr 19, 2021 7:03 pm
klatox wrote:
Mon Apr 19, 2021 4:34 pm
The share is a brand new Samsung T7, formatted as ntfs, and connected via USB 3 port.
There are problems with rpi's and some USB3 connected drives, could this drive be one ?
However, the main problem is probably the filesystem, NTFS is for Windows, you will get better performance with a Linux filesystem, ext4 for instance.
I tried the usb quirks adjustment in the sticky thread, unfortunately it did not alleviate the issue.

hortimech
Posts: 489
Joined: Wed Apr 08, 2015 5:52 pm

Re: Extraordinarily slow Samba speed

Tue Apr 20, 2021 7:55 am

klatox wrote:
Mon Apr 19, 2021 9:54 pm

As a test I tried a USB flash drive formatted as ext4 and it was also extremely slow, probably just as slow as the ntfs share.

I also tried formatting my T7 as ext4 and I'm actually getting worse speeds than with ntfs...less than 1MB/s over both samba and sftp
Then it looks like your problem is the USB drives you are using, try yet another drive, ext4 should be a lot faster.

Return to “Troubleshooting”