You are not logged in.

#1 2023-10-28 16:19:53

onedayillmakeit
Member
Registered: 2023-10-28
Posts: 14

[SOLVED] Can't fix Samba transfer speed

I installed arch on a computer, which is sharing an external hdd over the local network using Samba.

From my windows laptop, I am able to see the arch computer network share, but:

  1. The average transfer speed is 3 mb/s, and very often it dips to zero and bounces back.

  2. Connection is flaky. It often cuts out and sometimes I can't access it at all.

This is my samba config:

[global]
workgroup = WORKGROUP
server string = hal9000
server role = standalone server
bind interfaces only = no
hosts allow = 127.0.0.0/8 192.168.0.0/16 10.0.0.0/8 fc00::/7 fe80::/10
log file = /var/log/samba/%m.log
max log size = 50
log level = 3
dns proxy = no
read raw = Yes
write raw = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384

[depo]
path = /mnt/depo
browseable = yes
public = yes
writable = yes
create mask = 0755
guest ok = yes
directory mask = 0755
read only = no
force create mode = 0755
force directory mode = 0755
force user = dave
force group = wheel

hdparm shows an average ~135 mb/s read speed for the external hdd, giving me hope that much greater network transfer speeds are possible.

hdparm
/dev/sda1:
 Timing buffered disk reads: 406 MB in  3.00 seconds = 135.31 MB/sec
[root@hal9000 ~]# hdparm -t /dev/sda1

/dev/sda1:
 Timing buffered disk reads: 408 MB in  3.01 seconds = 135.58 MB/sec
[root@hal9000 ~]# hdparm -t /dev/sda1

/dev/sda1:
 Timing buffered disk reads: 408 MB in  3.01 seconds = 135.47 MB/sec

Any help is greatly appreciated. Thank you.

Last edited by onedayillmakeit (2023-11-02 09:09:46)

Offline

#2 2023-10-28 18:34:07

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [SOLVED] Can't fix Samba transfer speed

Is this limited to SMB or also reflected by eg. iperf ?
https://wiki.archlinux.org/title/Benchmarking#iperf (there's also a windows version of that)

General sanity check:
Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Offline

#3 2023-10-29 07:35:46

onedayillmakeit
Member
Registered: 2023-10-28
Posts: 14

Re: [SOLVED] Can't fix Samba transfer speed

seth wrote:

Please post the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
avahi-daemon.service                     | multi-user.target.wants
avahi-daemon.socket                      | sockets.target.wants
dbus-org.freedesktop.Avahi.service       | system
dbus-org.freedesktop.nm-dispatcher.service | system
getty@tty1.service                       | getty.target.wants
homebridge.service                       | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
nmb.service                              | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
smb.service                              | multi-user.target.wants
sshd.service                             | multi-user.target.wants
transmission.service                     | multi-user.target.wants
wsdd2.service                            | multi-user.target.wants

iperf test results:

Connecting to host 192.168.1.18, port 5201
[  4] local 192.168.1.10 port 2159 connected to 192.168.1.18 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.01   sec  6.88 MBytes  57.2 Mbits/sec
[  4]   1.01-2.00   sec  5.62 MBytes  47.5 Mbits/sec
[  4]   2.00-3.01   sec  6.25 MBytes  51.9 Mbits/sec
[  4]   3.01-4.00   sec  6.50 MBytes  54.9 Mbits/sec
[  4]   4.00-5.01   sec  5.75 MBytes  48.0 Mbits/sec
[  4]   5.01-6.00   sec  6.12 MBytes  51.8 Mbits/sec
[  4]   6.00-7.02   sec  5.00 MBytes  41.4 Mbits/sec
[  4]   7.02-8.02   sec  4.88 MBytes  40.9 Mbits/sec
[  4]   8.02-9.01   sec  5.62 MBytes  47.2 Mbits/sec
[  4]   9.01-10.00  sec  6.88 MBytes  58.4 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  59.5 MBytes  49.9 Mbits/sec                  sender
[  4]   0.00-10.00  sec  59.5 MBytes  49.9 Mbits/sec                  receiver

Offline

#4 2023-10-29 08:17:02

seth
Member
Registered: 2012-09-03
Posts: 60,787

Re: [SOLVED] Can't fix Samba transfer speed

No confliciting network services and you'd get about 10 MB/s (minus overhead, regardless whether you meant 3MB or 3Mb, the connection doesn't seem to be the problem)

Do you get faster traffic from an internal disk or usb key?
(The theory would be that the disk fills the cache, then has to wait for the much slower network, powers/spins down and is slow to spin up when the reads continue)

Offline

#5 2023-10-29 10:08:24

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: [SOLVED] Can't fix Samba transfer speed

onedayillmakeit wrote:
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  59.5 MBytes  49.9 Mbits/sec                  sender
[  4]   0.00-10.00  sec  59.5 MBytes  49.9 Mbits/sec                  receiver

Do you expect this network connection to be this slow (if iperf sends and receives at the same time - 100MBit half-duplex)?

Offline

#6 2023-11-02 09:08:44

onedayillmakeit
Member
Registered: 2023-10-28
Posts: 14

Re: [SOLVED] Can't fix Samba transfer speed

-thc wrote:

Do you expect this network connection to be this slow (if iperf sends and receives at the same time - 100MBit half-duplex)?

Not at first, but now that I tested it extensively, seems like it's a hardware issue.

Slow transfer was because of my bad router, and the random disconnects due to a bad hdd controller...

Thanks for everyone's input, I still learned a few things smile

Offline

Board footer

Powered by FluxBB