You are not logged in.

#1 2019-06-03 03:30:24

Verequies
Member
Registered: 2019-06-03
Posts: 7

Samba share rediculously slow

Having some trouble setting up my samba share. Getting write speeds of max ~4 MiB/s, which is way to slow. I am unsure of how to get this up to something acceptable.
Doing a speedtest on both Wi-Fi and Ethernet yields speeds of ~120 Mbps, so I don't think its my network thats causing the bottleneck.
So far I have tried tweaking sysctl options and samba options based on the Arch Wiki here: https://wiki.archlinux.org/index.php/Sa … throughput.

Any help would be greatly appreciated smile

Last edited by Verequies (2019-06-03 03:30:47)

Offline

#2 2019-06-03 03:35:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Samba share rediculously slow

Conf and journal entries would be the minimum debugging information for assistance.


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-06-03 04:34:52

Verequies
Member
Registered: 2019-06-03
Posts: 7

Re: Samba share rediculously slow

Sure, not exactly sure about the journalctl, but heres the relevant configs:

/etc/sysctl.d/99-sysctl.conf: https://pastebin.com/9XyZWJWU
/etc/samba/smb.conf: https://pastebin.com/5bBkxEhm

I removed all the performance tweaks since they did nothing.

Last edited by Verequies (2019-06-03 04:44:18)

Offline

#4 2019-06-03 07:49:32

seth
Member
Registered: 2012-09-03
Posts: 50,980

Re: Samba share rediculously slow

Getting write speeds of max ~4 MiB/s

So what about reading rates?

Also

cat /var/log/samba/smbd.log
man journalctl

Online

#5 2019-06-03 08:18:43

Verequies
Member
Registered: 2019-06-03
Posts: 7

Re: Samba share rediculously slow

Read speeds are about 9 MiB/s.

/var/log/samba/log.smbd: https://pastebin.com/k0YQ7qRs

journalctl shows the same as the log. Just it starting up.

Offline

#6 2019-06-03 08:41:40

seth
Member
Registered: 2012-09-03
Posts: 50,980

Re: Samba share rediculously slow

Is it maybe limited by the servers disk I/O (like because it's actually a rasperry pi w/ a usb 2.0 disk)?
You can also raise the log level in smbd.conf

Online

#7 2019-06-03 09:06:15

Verequies
Member
Registered: 2019-06-03
Posts: 7

Re: Samba share rediculously slow

The server is an x86_64 based machine. The drive connected to it is a SATA 3 TiB Hitachi HGST HDD. I don't think its I/O related at all. The CPU is a i5-3330, with 16 GiB of RAM, and a 256 GiB SDD as the boot drive.

Debug log file: https://drive.google.com/open?id=1Pex5B … gcgJj1qzRQ

Offline

#8 2019-06-03 09:31:56

seth
Member
Registered: 2012-09-03
Posts: 50,980

Re: Samba share rediculously slow

Don't think believe, try.

You've asymmetric rates over a symmetric (it's a ethernet LAN, is it?) network. That screams the net IO isn't the bottleneck.

What FS is used on the server? LVM? Encryption?
See whether anything else (nfs/http - https://wiki.archlinux.org/index.php/Lighttpd ) can produce faster rates and also whether serving out of unencrypted RAM is faster.

Online

#9 2019-06-03 09:41:30

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: Samba share rediculously slow

Test what speeds you get with iperf3. Man page: https://www.mankier.com/1/iperf3


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#10 2019-06-03 11:30:34

Verequies
Member
Registered: 2019-06-03
Posts: 7

Re: Samba share rediculously slow

Will test speeds with iperf3. File system for both the SSD and HDD is ext4 with the options 'defaults,discard,noatime,commit=600'.
Neither is encrypted. Testing transfer over scp yields bout the same results.

EDIT: I get these results with iperf3 - https://pastebin.com/6Z88JHSj

Last edited by Verequies (2019-06-03 11:34:19)

Offline

#11 2019-06-03 12:45:54

seth
Member
Registered: 2012-09-03
Posts: 50,980

Re: Samba share rediculously slow

Looks like a 100MBit network, ethtool output on client and server?
(you can look up the interface names in "ip l")

Where did you run the initial speed test (yielding 120 Mbps), client, server or both?

Online

#12 2019-06-03 17:27:19

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: Samba share rediculously slow

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  87.5 MBytes  73.4 Mbits/sec  189             sender

189 retries is a bit worrying, could be bad cables?

Can you run the same test in reverse direction with -R flag on client side

Last edited by ugjka (2019-06-03 17:29:19)


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#13 2019-06-04 01:07:00

Verequies
Member
Registered: 2019-06-03
Posts: 7

Re: Samba share rediculously slow

This is definitely a gigabit network. Most of the network is routed over Ethernet to a gigabit switch, which then goes to a gigabit router. The server this is operating on is directly connected to the router also.
For Wi-Fi, there is an AP, that is Ethernet to the switch. Nothing is PoE.

Server Ethtool Output: https://pastebin.com/QqV12sTj
iperf3 Reverse Output: https://pastebin.com/Mfz39ZjV

As far as I know, the cables are fine, but I could be wrong. Would be a pain to replace them as they are routed throughout the roof etc.

The speedtest was run on both client and server, and a number of other devices/systems on the network.

Last edited by Verequies (2019-06-04 01:08:23)

Offline

#14 2019-06-04 09:38:52

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: Samba share rediculously slow

You are getting nowhere near gigabit speeds and there are retries. I'm no networking expert but something must be terribly wrong.


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#15 2019-06-23 11:44:31

ould
Member
Registered: 2007-05-22
Posts: 124

Re: Samba share rediculously slow

Did you ever get this sorted out?

I am having a similar issue after a system update the other night. Nothing else changed except I ran the update(Samba did update during this.)

Browsing my shares is quite fast at first but it seems as soon as I drill down to a folder with a bunch of files in it or I try to actually open a file, things slow to an absolute crawl. Nothing in the logs. I tried redoing my config file, eliminating all shares but one, no change to speed though with anything I have tried. Never had any issues prior to this. Browsing same folders locally(over VNC) is lightning quick, can open files without issue etc. I have tried this through windows and also from a file manager I have on my Android phone which both worked without issue prior to this. Everything else on the system appears to be working fine.

Last edited by ould (2019-06-23 12:15:50)

Offline

#16 2019-06-23 12:15:00

seth
Member
Registered: 2012-09-03
Posts: 50,980

Re: Samba share rediculously slow

This is probably due to your filebrowser statting the files like hell, maybe even trying to generate previews (ie. there's a lot of traffic going on)
Try the behavior w/ eg. mc (midnight commander)

Online

#17 2019-06-23 12:30:36

ould
Member
Registered: 2007-05-22
Posts: 124

Re: Samba share rediculously slow

Edit: Not sure what I did but seems to be fixed for the moment. Hate when that happens, not sure what caused it nor what fixed it. :-/

Last edited by ould (2019-06-23 14:14:20)

Offline

#18 2019-06-26 02:48:22

Verequies
Member
Registered: 2019-06-03
Posts: 7

Re: Samba share rediculously slow

Mind showing us your configs? I have yet to fix my issues, but my network seems to be fine and definitely gigabit, still unsure about the retries though.

Offline

Board footer

Powered by FluxBB