Samba performance issues

Kernels & Hardware, configuring network, installing services

Samba performance issues

Postby dragoniade » 2020-07-18 02:47

Hello,
I'm a bit desperate and this is sort of my last resort to fix this problem that has been plaguing me for years.
I have a home made NAS: A linux box with multiple disk
It has 2 RAID1 disk for the OS and 5 Disk for the data. Those are JBOD with an offsite mirror.
I use Samba to share files to my Windows clients.

I have been running Debian 7.11 on it for year.
I tried once to upgrade to Debian 8, but the performance where horrible.
I recently upgraded to Debian 10, hoping the performance issues had been fixed. Sadly no

I've googled left and right. Tried a few "performance" tweak that helped, but nothing near the original performance.

On Debian 7.11 / Samba 3.6.6, I'm getting a steady 75MB/95MB of file transfer.
On Debian 10 / Samba 4.9.5 I'm getting a roller coaster of between 25MB and 60 MB/S, the average being 40 MB/S

On the same machine, if I swap the OS disk between Debian 7.11 and Debian 10, I can see the performance change, so I know it's not an hardware issue.

Here are the "performance" tweak I have applied on Debian 10
Code: Select all
# Settings to enhance performance:
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = TCP_NODELAY SO_SNDBUF=128480 SO_RCVBUF=128480
max protocol = SMB2
# End of performance section


Does anyone have any idea how to fix this issues with Samba?
At this point, I'm thinking of reverting all of my File server to either Debian 7.11, or try another distro.

Thanks
dragoniade
 
Posts: 5
Joined: 2020-07-18 02:11

Re: Samba performance issues

Postby dragoniade » 2020-07-18 03:06

This is a transfer summary using Debian 7
Image

This is a transfer summary using Debian 11 with Tweak:
Image

This is a transfer summary using Debian 11 with NO Tweak:
Image
dragoniade
 
Posts: 5
Joined: 2020-07-18 02:11

Re: Samba performance issues

Postby LE_746F6D617A7A69 » 2020-07-18 07:53

dragoniade wrote:I have a home made NAS: A linux box with multiple disk
What hardware do You have in that box? (especially the network card)
Is this an ARM-based NAS or a regular PC?
How the clients are connected?
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 280
Joined: 2020-05-03 14:16

Re: Samba performance issues

Postby dragoniade » 2020-07-18 12:45

This is a regular PC with 2 drives enclosure (2x2.5 and 5x3.5)
Motherboard is a P5G41-M LE with the following components:

CPU: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
RAM: 2 GB
Ethernet controller: Qualcomm Atheros AR8121/AR8113/AR8114 Gigabit or Fast Ethernet (rev b0)
SATA controller: Marvell Technology Group Ltd. Device 9215 (rev 11)


The clients are connected through a 1 GB switch with cat5e cables. All equipment are in the same room
dragoniade
 
Posts: 5
Joined: 2020-07-18 02:11

Re: Samba performance issues

Postby LE_746F6D617A7A69 » 2020-07-18 14:23

I would suggest to first check the network speed, f.e. using rsync --progress to transfer some large file.
This will show whether the problem is really with samba or with something else.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 280
Joined: 2020-05-03 14:16

Re: Samba performance issues

Postby dragoniade » 2020-07-18 17:00

I did the a rsync test using the same file as on the Samba transfer.
Except this was done to another Linux machine.
My first test were lower on both machine, until I realize that SSH+Rsync may put a bit of overhead due to the compression of compressed file and encryption.

Redoing the same transfer in DAEMON mode give me the same transfer speed on both system, which is equal to the SAMBA 3.6.6 transfer speed : ~80MB/s
So no, the network is not the culprit. I read some time ago there was some issues with certain drivers. But seeing this behaviour after the upgrade on 2 systems (this and his off-site backup) using 2 different NIC brands, I kind of stroke off the NIC factor.

Debian 7
sent 7,962 bytes received 4,467,150,861 bytes 81,966,216.94 bytes/sec
total size is 4,466,564,278 speedup is 1.00

Debian 11
sent 8,574 bytes received 4,467,697,711 bytes 80,499,212.34 bytes/sec
total size is 4,466,564,278 speedup is 1.00
dragoniade
 
Posts: 5
Joined: 2020-07-18 02:11

Re: Samba performance issues

Postby LE_746F6D617A7A69 » 2020-07-19 14:01

Since version 3.6.6 Samba project received tons on important/critical bugfixes, and so it's quite possible that those fixes have introduced regression in performance.
I would suggest that You should file a bug report.

What about local ftp server?
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 280
Joined: 2020-05-03 14:16

Re: Samba performance issues

Postby dragoniade » 2020-07-20 12:00

I'll give them a try.
After trying another distro with a Samba 4.X instance, it's pointing out more toward samba than Debian.
Thanks for your help and time
dragoniade
 
Posts: 5
Joined: 2020-07-18 02:11


Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable