Copy to smb share slow

Hi Folks,

I have a FreeNas server. That server is able to read/write at 1GBE cap, so about 110mb/s is typical to write on (tested it with the same hardware/network topology, but client was windows).

today i was wondering why it takes so long and saw, it just use <50 mb/s

Thunar is version 1.8.16
kernel 5.9
NIC is having static ipv4 with fixed 1gbe full duplex

since there is no change in hardware/ network/ server, I assume it hast to be something with manjaro (be it drivers, settings or whatever)

any idea on how to bring speeds back to “as it should be”?

nic is intel i211-AT (onboard)

any information missing?

How are you mounting the samba share in Manjaro? What version is the share mounted as? I mount my samba shares as v3.1.1 using fstab, and my copy speed is comparable to that on windows with the same hardware (~100 MB/s using ethernet, ~35 MB/s wireless ac). My NAS server is FeeBSD 12.1 (gigabit ethernet connection), so probably not dissimilar to your FreeNAS setup, and I’m using Manjaro KDE with Dolphin as my file manager.

i mount one part via fstab and another i mount via thunar gui.
just copied a file on both locations one after another and i dont see much difference (probably normal fluctuation)

copy to fstab mounted share via thunar 43MiB
copy to thunar mounted share via thunar 51MiB

smb on freenas should be min or greater version 3 but not exactly sure what version i am using. However smb version did not change on server (windows vs manjaro)

fstab:
    //192.168.0.119/qnap/9-Backup/Backup_Manjaro/   /mnt/Backup cifs credentials=/home/desktop/.smbpasswd,noperm 0 0

If your minimum set on FreeNAS is v3 then I doubt that would be the issue but I guess you could specify vers=3.1.1 as well just to check, as Windows is likely using that version by default.

Are you sure that the issue lies with the samba sharing, or could it be with your ethernet port configuration in Manjaro? i.e. are you able to get close to gigabit transfer speeds with either internet or NFS shares? One thing you could do is also export NFS shares from FreeNAS and see if the speed picks up to what you expect for your system - then you know that it is indeed something to do with your samba configuration on Manjaro. If it’s still slow with NFS, it might be configuration of your network adapter.

Did some iperf3 testing:

[desktop@desktop-systemproductname ~]$ iperf3 -c 192.168.0.120 -P 8
Connecting to host 192.168.0.120, port 5201
[  5] local 192.168.0.118 port 35052 connected to 192.168.0.120 port 5201
[  7] local 192.168.0.118 port 35054 connected to 192.168.0.120 port 5201
[  9] local 192.168.0.118 port 35056 connected to 192.168.0.120 port 5201
[ 11] local 192.168.0.118 port 35058 connected to 192.168.0.120 port 5201
[ 13] local 192.168.0.118 port 35060 connected to 192.168.0.120 port 5201
[ 15] local 192.168.0.118 port 35062 connected to 192.168.0.120 port 5201
[ 17] local 192.168.0.118 port 35064 connected to 192.168.0.120 port 5201
[ 19] local 192.168.0.118 port 35066 connected to 192.168.0.120 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  19.8 MBytes   166 Mbits/sec    0    250 KBytes       
[  7]   0.00-1.00   sec  20.2 MBytes   169 Mbits/sec    0    253 KBytes       
[  9]   0.00-1.00   sec  11.8 MBytes  99.2 Mbits/sec    0    153 KBytes       
[ 11]   0.00-1.00   sec  12.0 MBytes   101 Mbits/sec    0    141 KBytes       
[ 13]   0.00-1.00   sec  11.8 MBytes  99.2 Mbits/sec    0    154 KBytes       
[ 15]   0.00-1.00   sec  12.2 MBytes   102 Mbits/sec    0    158 KBytes       
[ 17]   0.00-1.00   sec  19.5 MBytes   164 Mbits/sec    0    246 KBytes       
[ 19]   0.00-1.00   sec  12.0 MBytes   100 Mbits/sec    0    150 KBytes       
[SUM]   0.00-1.00   sec   119 MBytes  1.00 Gbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec  19.3 MBytes   162 Mbits/sec    0    264 KBytes       
[  7]   1.00-2.00   sec  18.6 MBytes   156 Mbits/sec    0    277 KBytes       
[  9]   1.00-2.00   sec  11.4 MBytes  95.4 Mbits/sec    0    163 KBytes       
[ 11]   1.00-2.00   sec  11.1 MBytes  92.8 Mbits/sec    0    182 KBytes       
[ 13]   1.00-2.00   sec  11.6 MBytes  97.0 Mbits/sec    0    177 KBytes       
[ 15]   1.00-2.00   sec  11.2 MBytes  93.8 Mbits/sec    0    175 KBytes       
[ 17]   1.00-2.00   sec  18.8 MBytes   157 Mbits/sec    0    267 KBytes       
[ 19]   1.00-2.00   sec  11.5 MBytes  96.4 Mbits/sec    0    173 KBytes       
[SUM]   1.00-2.00   sec   113 MBytes   951 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.00   sec  18.5 MBytes   155 Mbits/sec    0    264 KBytes       
[  7]   2.00-3.00   sec  19.0 MBytes   160 Mbits/sec    0    277 KBytes       
[  9]   2.00-3.00   sec  11.4 MBytes  95.9 Mbits/sec    0    195 KBytes       
[ 11]   2.00-3.00   sec  11.6 MBytes  97.0 Mbits/sec    0    182 KBytes       
[ 13]   2.00-3.00   sec  11.2 MBytes  93.8 Mbits/sec    0    177 KBytes       
[ 15]   2.00-3.00   sec  11.4 MBytes  95.4 Mbits/sec    0    202 KBytes       
[ 17]   2.00-3.00   sec  19.0 MBytes   160 Mbits/sec    0    267 KBytes       
[ 19]   2.00-3.00   sec  11.2 MBytes  93.8 Mbits/sec    0    181 KBytes       
[SUM]   2.00-3.00   sec   113 MBytes   950 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   3.00-4.00   sec  19.6 MBytes   164 Mbits/sec    0    264 KBytes       
[  7]   3.00-4.00   sec  18.5 MBytes   155 Mbits/sec    0    277 KBytes       
[  9]   3.00-4.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 11]   3.00-4.00   sec  11.4 MBytes  95.4 Mbits/sec    0    194 KBytes       
[ 13]   3.00-4.00   sec  11.0 MBytes  92.3 Mbits/sec    0    187 KBytes       
[ 15]   3.00-4.00   sec  11.3 MBytes  94.9 Mbits/sec    0    202 KBytes       
[ 17]   3.00-4.00   sec  17.9 MBytes   150 Mbits/sec    0    267 KBytes       
[ 19]   3.00-4.00   sec  11.0 MBytes  92.3 Mbits/sec    0    191 KBytes       
[SUM]   3.00-4.00   sec   112 MBytes   939 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   4.00-5.00   sec  18.5 MBytes   155 Mbits/sec    0    276 KBytes       
[  7]   4.00-5.00   sec  19.0 MBytes   160 Mbits/sec    0    277 KBytes       
[  9]   4.00-5.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 11]   4.00-5.00   sec  11.1 MBytes  92.8 Mbits/sec    0    194 KBytes       
[ 13]   4.00-5.00   sec  11.5 MBytes  96.4 Mbits/sec    0    195 KBytes       
[ 15]   4.00-5.00   sec  11.3 MBytes  94.9 Mbits/sec    0    211 KBytes       
[ 17]   4.00-5.00   sec  18.5 MBytes   155 Mbits/sec    0    267 KBytes       
[ 19]   4.00-5.00   sec  11.4 MBytes  95.9 Mbits/sec    0    191 KBytes       
[SUM]   4.00-5.00   sec   113 MBytes   944 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   5.00-6.00   sec  18.5 MBytes   155 Mbits/sec    0    276 KBytes       
[  7]   5.00-6.00   sec  19.0 MBytes   160 Mbits/sec    0    277 KBytes       
[  9]   5.00-6.00   sec  10.9 MBytes  91.2 Mbits/sec    0    195 KBytes       
[ 11]   5.00-6.00   sec  11.2 MBytes  94.4 Mbits/sec    0    194 KBytes       
[ 13]   5.00-6.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 15]   5.00-6.00   sec  11.3 MBytes  94.9 Mbits/sec    0    211 KBytes       
[ 17]   5.00-6.00   sec  18.5 MBytes   155 Mbits/sec    0    267 KBytes       
[ 19]   5.00-6.00   sec  11.3 MBytes  94.9 Mbits/sec    0    191 KBytes       
[SUM]   5.00-6.00   sec   112 MBytes   939 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   6.00-7.00   sec  19.0 MBytes   160 Mbits/sec    0    276 KBytes       
[  7]   6.00-7.00   sec  18.5 MBytes   155 Mbits/sec    0    277 KBytes       
[  9]   6.00-7.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 11]   6.00-7.00   sec  11.1 MBytes  93.3 Mbits/sec    0    194 KBytes       
[ 13]   6.00-7.00   sec  10.9 MBytes  91.2 Mbits/sec    0    195 KBytes       
[ 15]   6.00-7.00   sec  10.9 MBytes  91.2 Mbits/sec    0    211 KBytes       
[ 17]   6.00-7.00   sec  19.0 MBytes   160 Mbits/sec    0    267 KBytes       
[ 19]   6.00-7.00   sec  11.1 MBytes  93.3 Mbits/sec    0    191 KBytes       
[SUM]   6.00-7.00   sec   112 MBytes   938 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   7.00-8.00   sec  18.5 MBytes   155 Mbits/sec    0    276 KBytes       
[  7]   7.00-8.00   sec  19.1 MBytes   160 Mbits/sec    0    277 KBytes       
[  9]   7.00-8.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 11]   7.00-8.00   sec  11.2 MBytes  94.4 Mbits/sec    0    194 KBytes       
[ 13]   7.00-8.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 15]   7.00-8.00   sec  11.3 MBytes  94.9 Mbits/sec    0    211 KBytes       
[ 17]   7.00-8.00   sec  19.0 MBytes   160 Mbits/sec    0    267 KBytes       
[ 19]   7.00-8.00   sec  11.0 MBytes  92.3 Mbits/sec    0    191 KBytes       
[SUM]   7.00-8.00   sec   113 MBytes   946 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   8.00-9.00   sec  18.5 MBytes   155 Mbits/sec    0    276 KBytes       
[  7]   8.00-9.00   sec  18.6 MBytes   156 Mbits/sec    0    277 KBytes       
[  9]   8.00-9.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 11]   8.00-9.00   sec  11.2 MBytes  93.8 Mbits/sec    0    194 KBytes       
[ 13]   8.00-9.00   sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 15]   8.00-9.00   sec  11.3 MBytes  94.9 Mbits/sec    0    211 KBytes       
[ 17]   8.00-9.00   sec  19.5 MBytes   163 Mbits/sec    0    331 KBytes       
[ 19]   8.00-9.00   sec  11.5 MBytes  96.4 Mbits/sec    0    205 KBytes       
[SUM]   8.00-9.00   sec   113 MBytes   949 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   9.00-10.00  sec  17.9 MBytes   150 Mbits/sec    0    276 KBytes       
[  7]   9.00-10.00  sec  17.9 MBytes   150 Mbits/sec    0    277 KBytes       
[  9]   9.00-10.00  sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 11]   9.00-10.00  sec  11.2 MBytes  93.8 Mbits/sec    0    194 KBytes       
[ 13]   9.00-10.00  sec  11.3 MBytes  94.9 Mbits/sec    0    195 KBytes       
[ 15]   9.00-10.00  sec  11.3 MBytes  94.9 Mbits/sec    0    211 KBytes       
[ 17]   9.00-10.00  sec  19.8 MBytes   166 Mbits/sec    0    331 KBytes       
[ 19]   9.00-10.00  sec  11.3 MBytes  94.9 Mbits/sec    0    205 KBytes       
[SUM]   9.00-10.00  sec   112 MBytes   940 Mbits/sec    0             
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   188 MBytes   158 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   187 MBytes   156 Mbits/sec                  receiver
[  7]   0.00-10.00  sec   188 MBytes   158 Mbits/sec    0             sender
[  7]   0.00-10.00  sec   187 MBytes   157 Mbits/sec                  receiver
[  9]   0.00-10.00  sec   113 MBytes  95.1 Mbits/sec    0             sender
[  9]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec                  receiver
[ 11]   0.00-10.00  sec   113 MBytes  94.8 Mbits/sec    0             sender
[ 11]   0.00-10.00  sec   112 MBytes  94.1 Mbits/sec                  receiver
[ 13]   0.00-10.00  sec   113 MBytes  94.9 Mbits/sec    0             sender
[ 13]   0.00-10.00  sec   112 MBytes  94.1 Mbits/sec                  receiver
[ 15]   0.00-10.00  sec   113 MBytes  95.2 Mbits/sec    0             sender
[ 15]   0.00-10.00  sec   112 MBytes  94.4 Mbits/sec                  receiver
[ 17]   0.00-10.00  sec   189 MBytes   159 Mbits/sec    0             sender
[ 17]   0.00-10.00  sec   188 MBytes   158 Mbits/sec                  receiver
[ 19]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec    0             sender
[ 19]   0.00-10.00  sec   112 MBytes  94.1 Mbits/sec                  receiver
[SUM]   0.00-10.00  sec  1.11 GBytes   950 Mbits/sec    0             sender
[SUM]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec                  receiver

iperf Done.

That does seem like something is wrong - not only is it slow, it looks to fluctuate more than I would expect for wired ethernet to your NAS. I can’t connect my client via ethernet right now to compare, but here is one run of iperf3 using wireless ac on my Manjaro setup to my FreeBSD NAS:

Connecting to host 192.168.1.118, port 5201
[  5] local 192.168.1.129 port 33032 connected to 192.168.1.118 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  35.2 MBytes   296 Mbits/sec    0   1.17 MBytes       
[  5]   1.00-2.00   sec  31.2 MBytes   262 Mbits/sec    0   1.31 MBytes       
[  5]   2.00-3.00   sec  31.2 MBytes   262 Mbits/sec    0   1.31 MBytes       
[  5]   3.00-4.00   sec  32.5 MBytes   273 Mbits/sec    0   1.31 MBytes       
[  5]   4.00-5.00   sec  32.5 MBytes   273 Mbits/sec    0   1.39 MBytes       
[  5]   5.00-6.00   sec  32.5 MBytes   273 Mbits/sec    0   1.39 MBytes       
[  5]   6.00-7.00   sec  33.8 MBytes   283 Mbits/sec    0   1.39 MBytes       
[  5]   7.00-8.00   sec  33.8 MBytes   283 Mbits/sec    0   1.39 MBytes       
[  5]   8.00-9.00   sec  33.8 MBytes   283 Mbits/sec    0   1.39 MBytes       
[  5]   9.00-10.00  sec  33.8 MBytes   283 Mbits/sec    0   1.39 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   330 MBytes   277 Mbits/sec    0             sender
[  5]   0.00-10.31  sec   328 MBytes   266 Mbits/sec                  receiver

I think you may have an issue with your ethernet adapter in Manjaro, as your iperf3 performance to your NAS iperf server is also poor. I have the option to install proprietry drivers for my ethernet adapter - have you looked at the difference in performance between open source and proprietry, if available? The archi wiki also has a lot of detail on network configuration: https://wiki.archlinux.org/index.php/Network_configuration - I’ve not had to tweak anything beyond default, but maybe checking things like for example MTU size are correctly configured?

somehow funny to see interpretations. I would think the iperf is actually showing good results. i am close to max out my network.

if you scroll down on my test, you can find id 5 to 19. they all work in parallel and on the end you can see the sum.
so I would think, that I have transferred 1.1 Gbytes within 10 seconds resulting in a transfer speed of 950Mbits/s (out of a theoretical max 1’000Mbits/s)
that I would call a decent speed for just GBE

Am I wrong with my interpretation?

I am so sorry, you are correct - I had completely misread your numbers last night. I guess age is catching up with me. It does look like an issue with samba sharing then! My fstab entries are set up with the following:

credentials=/root/smbcred,uid=1000,gid=1000,vers=3.1.1,_netdev,x-systemd.automount,iocharset=utf8,file_mode=0777,dir_mode=0777  0  0

I guess you could try similar parameters in fstab to see if that helps? Obviously you would need to change your uid and gid to match you user, you characterset, and the location of your credentials file to match yours. I would be surprised if this makes a difference, but may be worth ruling out - perhaps making sure all are properly matched to the server and using latest version might work.

I realise that you had good performance with windows, but perhaps there might also be some tweaking on the server to work better with Linux? What are your send and receive buffer sizes set and, do you have asynchronous I/O and/or ACLs enabled for example?

Hi, have you had any luck with this? I guess also you could check to see whether the problem lies with your file manger as well by using another or something like dd to test performance?

I will check your inputs.
Just give me a bit time, currently people get crazy and require more of my time.

No worries, I hope you get it sorted.

found some time to try it but for some reason i could not get it working.

//192.168.0.119/qnap/   /mnt/Qnap cifs credentials=/home/desktop/.smbpasswd,uid=1000,gid=1000,vers=3.1.1,_netdev,x-systemd.automount,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

[desktop@desktop-systemproductname home]$ mount -a
mount.cifs: permission denied

I can remember mounting with systemd was different. but cannot recap what to do.

got it working. but speeds are not getting better

no one any idea?
or is information missing?

bring this thread up :slight_smile:

Hi, sorry for the late reply - I didn’t get a notification for some reason. I’m a bit confused - do you mean you got systemd mounting working, or fstab? I think mounting with systemd unit would ultimately be the same as with fstab, but there is a guide for using systemd here if you wanted it still: Manjaro systemd mount units. On your post with mount -a I think your permission was denied because you would need superuser rights to mount that share as shown.

Did you check file transfers using something like dd, just to see whether the issue lies with your file manager? Do you use ACLs? These can incur a performance penalty.

1 Like
1 Like

i am losing my patience with this :face_with_symbols_over_mouth:

okay lets start from the beginning. I removed the entries in the fstab to do it via mount units.

So I did

[desktop@desktop-systemproductname ~]$ sudo nano /etc/systemd/home-desktop-Qnap.mount

with the following content:

[Unit]
Description=FreeNas Mount
After=network.target

[Mount]
What=//192.168.0.119/Qnap
Where=/home/desktop/Qnap
Type=cifs
Options=_netdev,iocharset=utf8,rw,file_mode=0777,dir_mode=0777,credentials=/hom>
TimeoutSec=30

[Install]
WantedBy=multi-user.target

the same credentials as used and proved via fstab previously.

Reload:

[desktop@desktop-systemproductname ~]$ sudo systemctl daemon-reload

then:

   [desktop@desktop-systemproductname ~]$ sudo  systemctl start home-desktop-Qnap.mount
Failed to start home-desktop-Qnap.mount: Unit home-desktop-Qnap.mount not found.