Speed of SMB/AFP on Ubuntu suddenly collapses

Sascha_1977

New Member
Joined
Oct 25, 2021
Messages
4
Reaction score
0
Credits
41
My system:
Ubuntu 20.04.3 LTS 64Bit
Kernel 5.11.0-38-generic
Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz
16GB Ram
Network Intel Corporation I211 Gigabit Network Connection

I've had the problem for a while that the SMB performance just randomly drops (strangely enough as if suddenly there was only a 100Mbit connection ... but I have GBit) and only then returns to the old speed when I restart smbd. Before that it stays at up to 100Mbit. No errors in the smb.log by the way. What did I do until now?

- System reinstalled
- iperf / With this I have stable 940-960 Mbit without any drops
- tried several other kernels
- played around with the smb.conf

I am now at my wit's end. I also tried to use a USB 3.0 network card. With iperf I get 940-060 Mbit permanently.

By the way, the same phenomenon with netatalk. So it must have something to do with the kernel or?

I have this in the global section of the smb.conf. This conf was working without problems in the past.

Code:
read raw = Yes
write raw = Yes
#socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=262144 SO_SNDBUF=262144
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384
usershare max shares = 0

And this on the share level:

Code:
follow symlinks = yes
wide links = no
oplocks = NO
level2 oplocks = NO
path = /mnt/sync
read only = no
valid users = pi
public = yes
writable = yes
comment = smb share
printable = no
browseable = yes
create mask = 0640
directory mask = 0750

I also installed a VM with Debian on this machine and installed Samba there. Strangely enough, there are no collapses here. And that on the same hardware. Very odd thing.
 
Last edited:


I think a wireshark capture at the time your transfer rate changes would be interesting. The kind of thing you are describing usually occurs because of communications errors or something is being over run. Might also be NIC driver.
 
I think I found the problem. My FritzBox. I set it back to factory defaults and now I don´t have any drops (at least at the moment). But why iperf was working ok?
 
You noted AFP. I'm guessing you are sharing with a Mac? Mac is the bane of all existence as it pertains to Samba. It's been a while, but there was a time that I was forced to use SMB1 for Macs because they would occasionally puke all over newer Samba protocols.

A month ago we gave a brand new Mac to our head artist. She is getting a new Mac today, but we are downgrading MacOS to a previous release. The newest release (from 2020) occasionally gets choked up working with Samba.

ugh, Macs in the Enterprise suck.
 
Yes. I have Hackintoshs here. But the Drops where with Windows too. Its was not a macOS problem.

SMB and Apple is a separate story. Did you try this?

Code:
sudo -s
echo "[default]" >> /etc/nsmb.conf
echo "signing_required=no" >> /etc/nsmb.conf
exit
 
Hmpf. Problem is back. :(
Luckily the ShuttlePC has 2 Ethernetports. I simply shared the 2nd one, installed a dhcp server and now all my clients are routed through this machine. Speedproblem gone. Don´t know whats the Problem with the FritzBox. Perhaps a bad Firmware or something.
 

Members online


Top