Jump to content

Hi all,
 

I'm new to Samba and everything, but I've setup a Ubuntu Server with Samba and would like to know if the speeds I'm reaching are reasonable. It seems that Samba is a hit or mis reading all the threads, blogs on Samba speed tweaks.

The test transfers are from OSX to Ubuntu and the samba shared folder is on the internal SSD on the Intel NUC, so no external drives at the moment.
 

Setup
Intel NUC NUC8i3BEH 16 GB RAM, SSD Samsung SSD 980 250GB 1B4QFXO7 w/ Ubuntu Server and Samba
Macbook Pro M1 Max 2021, 64GB RAM, SSD, w/ OSX Sequoia

 

LAN Connections
Devices above are connected through UTP with the TP Link Switch and switch is connected to the Sagemcom Router.
 

Router: Sagemcom F5359
Switch: TP-Link LS1005G 1GBPs
All UTP cables have been upgraded, CAT 6A

Also checked if the Ubuntu Servers Ethernet Adapter is on 1Gbps:

$ sudo ip addr | grep qlen

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
3: wlp0s20f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000

 

Samba Conf Tweaks, based on link

# Socket buffers should be huge:
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536

# Use sendfile for reading files efficiently:
use sendfile = yes

# Cache data before flushing to disk:
write cache size = 2097152
min receivefile size = 16384
getwd cache = true

 

iperf3

iperf3 server running on the Intel NUC (Ubuntu Server 24.04)
iperf3 client running on the Macbook Pro (OSX Sequoia)

 

x@macbookpro ~ % iperf3 -c 192.168.2.8
Connecting to host 192.168.2.8, port 5201

[  5] local 192.168.2.52 port 58566 connected to 192.168.2.8 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  43.8 MBytes   366 Mbits/sec
[  5]   1.00-2.00   sec  44.1 MBytes   370 Mbits/sec
[  5]   2.00-3.00   sec  44.0 MBytes   369 Mbits/sec
[  5]   3.00-4.00   sec  43.8 MBytes   367 Mbits/sec

^C[  5]   4.00-4.02   sec  1.00 MBytes   530 Mbits/sec

- - - - - - - - - - - - - - - - - - - - - - - - -

[ ID] Interval           Transfer     Bitrate
[  5]   0.00-4.02   sec   177 MBytes   369 Mbits/sec sender
[  5]   0.00-4.02   sec  0.00 Bytes  0.00 bits/sec receiver

 

rsync

x@macbookpro Downloads % rsync --progress lglr_setup_global_online_gb_2025228_67.zip /Volumes/sambashares/Desktop
lglr_setup_global_online_gb_2025228_67.zip
4563504064 100%   21.45MB/s    0:03:22 (xfer#1, to-check=0/1)
sent 4564061263 bytes  received 42 bytes  22427819.68 bytes/sec
total size is 4563504064  speedup is 1.00

 

Switching from WiFi to only LAN increased the speed from 9MB/s to 22/24MB/s.
I expected a higher write out speed to my Samba Server tbh.
 

I understand that iperf3 shows the RAW speeds and doesn't take in consideration all the variables ofc, but still.

So my question, is 22/24MB/s reasonable with this setup in a local network and are there any things I could improve?

Thanks in advance!

 

Link to comment
https://linustechtips.com/topic/1608001-samba-server-optimal-speed/
Share on other sites

Link to post
Share on other sites

1 hour ago, BoomerDutch said:

So if your requirement is faster speed.

I'd suggest to try nfs instead since it's faster than samba.

Hi @BoomerDutch,

Thanks for your reply.
Didn't try NFS yet to be honest, but will give it a shot later today and I'll share the outcome of it.

Link to post
Share on other sites

1 hour ago, bitsandbytes said:

Hi @BoomerDutch,

Thanks for your reply.
Didn't try NFS yet to be honest, but will give it a shot later today and I'll share the outcome of it.


Just installed and setup NFS on the Ubuntu Server and mounted the folder on OSX
Copying the same file with rsync to the NFS mount: 

12094570496  68%   33.18MB/s    0:02:42

Somewhat of an improvement, but not much.
Using rsync of SSH gives me a much faster speed on my local network.
 

 5468125184 100%  243.49MB/s    0:00:21 (xfer#1, to-check=0/1)
Edited by bitsandbytes
mixed up NFS/SSH transfer.
Link to post
Share on other sites

SMB should be plenty fast… I run a 10 gig LAN and can get 4-6 ish gigabit transfers to and from my harddrive array. If data is cached in RAM (this is a ZFS array, so data chances in ARC when the server recognizes it’s used often) I easily saturate the 10 gig link. 
 

But, I’m not very knowledgeable about tuning any network settings, so I can’t tell you why you’re experience weirdness. 

Rig: i7 13700k +Contact Frame - - Asus Z790-P Wifi - - RTX 4080 - - 4x16GB 6000MHz - - Samsung 990 Pro 2TB NVMe Boot + Main Programs - - Crucial P3 2TB NVMe for photo work - - Corsair RM850x - - Sound BlasterX EA-5 - - Corsair XC8 JTC Edition - - Corsair GPU Full Cover GPU Block - - PTM 7950 - - XT45 X-Flow 420 + UT60 280 rads externally mounted - - EK XRES RGB PWM - - Fractal Define S2 - - DellAlienware AW3423DWF 34" -- Logitech Pro X Superlight - - Logitech G710+ - - LTT Northern Lights Deskpad

 

Headphones/amp/dac: Schiit Bifrost Multibit - -  Schiit Lyr 3 - - Fostex TR-X00 - - Sennheiser HD 6xx

 

Homelab/Media Server: Proxmox VE host - - 512 NVMe Samsung 980 RAID Z1 for VM's/Proxmox boot - - Xeon e5 2660 V4- - Supermicro X10SRF-i - - 128 GB ECC 2133 - - 10x8TB WD Red RAID Z2 - - 2x 800 GB SAS SSD’s (1 SLOG, 1 L2Arc) - - 45 HomeLab HL15 15 Drive 4U - - Corsair RM650i - - LSI 9305-16i HBA - - TreuNAS + many other VM’s

 

Unifi UDM Pro in front of full unifi network infrastructure

 

iPhone 17 Pro - - MacBook Air M3

Link to post
Share on other sites

Some possible bottlenecks in such a configuration:

  • A USB Ethernet adapter is used on the server side, and unfortunately run on slower USB 2.0, as seen in the bitrate of "370 Mbits/sec".
  • The router or AP is insufficient in bandwidth with Wi-Fi connections, i.e. incapable of Wi-Fi 6 or 1700Mbps+.
  • The Macbook is connected via Wi-Fi, instead of a cable and an Ethernet adapter, or is placed too far from router/AP.
  • Random problems with cables, ports, etc.
Link to post
Share on other sites

8 hours ago, bitsandbytes said:


Just installed and setup NFS on the Ubuntu Server and mounted the folder on OSX
Copying the same file with rsync to the NFS mount: 

12094570496  68%   33.18MB/s    0:02:42

Somewhat of an improvement, but not much.
Using rsync of SSH gives me a much faster speed on my local network.
 

 5468125184 100%  243.49MB/s    0:00:21 (xfer#1, to-check=0/1)

Glad it was slight improvement.

 

If you're using ethernet usb cables then use usb3 (blue ones usually) for better performance.

 

Can you try vlan for important ones and see if it improves it.

It's possible that traffic is filled up for some reason.

 

Check your router settings and see if there is any support like mine has media priority which means it youtube netflix and such gets vip queue.

I'm jank tinkerer if it works then it works.

Regardless of compatibility 🐧🖖

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×