-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Describe the bug
I'm using a Pi 4 as a basic Samba share for several months now.
Recently after performing a system update & upgrade I noticed a degraded read and write performance.
It must be related to a recent update since otherwise, nothing has changed.
The write performance has dropped from a constant 113MB/s to around 75MB/s.
Since nothing else has changed in my setup I flashed an older build of Raspberry Pi OS ( 64bit was the only image I could find) to the Pi.
With this version, it's performing very well, just like the last few months.
But after running a system update && upgrade performance is significantly worse again.
The Samba version is exactly the same in both situations.
I guess it's related to the newer kernel and maybe some changes to the underlying network stack?
To reproduce
Configure a basic samba share on some external storage with an older version of Raspberry Pi OS.
I've used this build
After running a system update && upgrade the write performance is much lower than before.
Expected behaviour
More or less stable transfer at 100MB/s+
Actual behaviour
After a few seconds, the write speed to the Pi drops to around 75MB/s and stays there.
System
Raspberry Pi 4 2GB with Crucial MX500 attached via UASP USB3 adapter.
The disk is formatted as XFS and has trim support enabled.
WORKING
Linux raspberrypi 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 GNU/Linux
Raspberry Pi reference 2020-08-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7252c154838ec5b4576f29c996ac8fe3750cae12, stage4
Aug 19 2020 17:38:16
Copyright (c) 2012 Broadcom
version e90cba19a98a0d1f2ef086b9cafcbca00778f094 (clean) (release) (start)
NOT WORKING
Linux raspberrypi 5.10.11-v7l+ #1399 SMP Thu Jan 28 12:09:48 GMT 2021 armv7l GNU/Linux
Raspberry Pi reference 2021-01-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21090519d85bdaa1615d5d5057d37b09368ea5d2, stage2
Jan 27 2021 22:19:57
Copyright (c) 2012 Broadcom
version 99d9a48302e4553cff3688692bb7e9ac760a03fa (clean) (release) (start)
Logs
No relevant output in dmesg or syslog
Additional context
I've tested it with three different drives, and two different Pis.
I also reinstalled Raspberry Pi OS several times, with nothing other than samba installed.
Therefore I'm 100% sure it's related to one of the updates.
The disk itself is performing well in both cases.
root@raspberrypi/home # dd if=/dev/zero of=test.data bs=4M count=1K
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 13.0589 s, 329 MB/s