You are not logged in.

#1 2020-12-21 18:57:21

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 95

NFS4 same setup, two different speeds

I have two laptops, both are running Arch. I found very frustrating, that sftp is very slow using home router, I tried to use NFS. To my greatest surprise, the speed of NFS is exactly the same as sftp. However, I noticed, that when I want to transfer file x from one laptop to another, I get two different speeds depending on which laptop is used to transfer the file. For instance, if I start a transfer from the purple laptop (PL) to white laptop (WL) using /mnt/WL, I get 600kbps, whereas, when I start a transfer from a WL using /mnt/PL, the transfer is 3MiB/s. So, the same file, located in one laptop, two different transfer speed. Can this be fixed?

Config of White laptop:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# UUID=495f101c-bdd6-40f3-afdd-04eb002bc14f
/dev/sda2               /               ext4            rw,relatime     0 1

# /dev/sda4
UUID=b70acc56-f84d-448b-a8fc-34c0d7eff639       /home           ext4            rw,relatime     0 2

# /dev/sda1
UUID=FB2A-7CF2          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro      0 2

# 
192.168.0.14:/home /mnt/ad4ms3_PL nfs  defaults,sync,x-systemd.mount-timeout=6  0 0
cat /etc/exports
/home 192.168.0.14(rw,sync,nohide)

Purple laptop config:

# Static information about the filesystems.
   2   │ # See fstab(5) for details.
   3   │ 
   4   │ # <file system> <dir> <type> <options> <dump> <pass>
   5   │ # UUID=c04c4512-f430-4597-85a1-290ac480d78b
   6   │ /dev/sda1               /           ext4        rw,relatime,data=ordered    0 1
   7   │ # UUID=5282cfa6-5f3f-4669-a707-19a41600afa8
   8   │ /dev/sda2              /home            ext4            rw,defaults                     0 0
   9   │ 
  10   │ 
  11   │ 192.168.0.16:/home /mnt/ad4ms3_WL  nfs  defaults,sync,noauto,x-systemd.automount,x-systemd.mount-timeout=6  0  0
/etc/export:

/home 192.168.0.16(rw,sync,nohide)

So not much difference, yet two different speeds.
dhcpcd is disabled, and only Network Manager is running on both laptops.

CPU is not the issue . Htop shows everything is ok. It appears to me, that the wifi card on PL is not working at the capacity of the wifi. It won't get any faster speed that 6MB/s, whereas the WL will reach 13 MB/s.

ping from PL to WL:

ping -s 1000 192.168.0.16                                                
PING 192.168.0.16 (192.168.0.16) 1000(1028) bytes of data.
1008 bytes from 192.168.0.16: icmp_seq=1 ttl=64 time=6.18 ms
1008 bytes from 192.168.0.16: icmp_seq=2 ttl=64 time=47.1 ms
1008 bytes from 192.168.0.16: icmp_seq=3 ttl=64 time=9.32 ms
1008 bytes from 192.168.0.16: icmp_seq=4 ttl=64 time=8.76 ms
1008 bytes from 192.168.0.16: icmp_seq=5 ttl=64 time=7.83 ms
1008 bytes from 192.168.0.16: icmp_seq=6 ttl=64 time=7.99 ms
1008 bytes from 192.168.0.16: icmp_seq=7 ttl=64 time=7.69 ms
1008 bytes from 192.168.0.16: icmp_seq=8 ttl=64 time=8.24 ms
1008 bytes from 192.168.0.16: icmp_seq=9 ttl=64 time=8.77 ms
^Z
zsh: suspended  ping -s 1000 192.168.0.16

And the same command from White laptop to Purple:

ping -s 1000 192.168.0.14
PING 192.168.0.14 (192.168.0.14) 1000(1028) bytes of data.
1008 bytes from 192.168.0.14: icmp_seq=1 ttl=64 time=19.2 ms
1008 bytes from 192.168.0.14: icmp_seq=2 ttl=64 time=8.51 ms
1008 bytes from 192.168.0.14: icmp_seq=3 ttl=64 time=17.2 ms
1008 bytes from 192.168.0.14: icmp_seq=4 ttl=64 time=9.66 ms
1008 bytes from 192.168.0.14: icmp_seq=5 ttl=64 time=13.7 ms
1008 bytes from 192.168.0.14: icmp_seq=6 ttl=64 time=6.96 ms
1008 bytes from 192.168.0.14: icmp_seq=7 ttl=64 time=11.0 ms
1008 bytes from 192.168.0.14: icmp_seq=8 ttl=64 time=8.69 ms
1008 bytes from 192.168.0.14: icmp_seq=9 ttl=64 time=6.75 ms
^Z
[1]+  Stopped                 ping -s 1000 192.168.0.14

Offline

#2 2020-12-21 21:53:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,646

Re: NFS4 same setup, two different speeds

How do you transfer the file? cp, nfs-cp or some GUI filebrowser/manager?
Did you try to copy from /tmp to /tmp to rule out disk IO as the bottleneck?
Can you switch to wired connections and compare the performance to confirm it's related to the WiFi NIC?
Otherwise at least compare the current txpower, "iw dev <device> info" - if AP and WL have a high txpower and PL a low, that could explain why it's good-ish at receiving, but not at sending data.

Offline

#3 2020-12-22 12:23:56

ad4ms3
Member
From: Bradford, UK
Registered: 2018-01-19
Posts: 95

Re: NFS4 same setup, two different speeds

Thanks for the reply.

How do you transfer the file? cp, nfs-cp or some GUI filebrowser/manager?

I used dolphin. Both laptops use Plasma5.

Did you try to copy from /tmp to /tmp to rule out disk IO as the bottleneck?

Both laptops have SSD.

Can you switch to wired connections and compare the performance to confirm it's related to the WiFi NIC?

If I find 2 ethernet cables i give it a go.

Otherwise at least compare the current txpower, "iw dev <device> info" - if AP and WL have a high txpower and PL a low, that could explain why it's good-ish at receiving, but not at sending data.

Output from PL:

iw dev wlo1 info
Interface wlo1
        ifindex 2
        wdev 0x1
        addr e0:06:e6:7b:72:06
        ssid VM6290799
        type managed
        wiphy 0
        channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
        txpower 20.00 dBm

Output from WL

iw dev wlo1 info
Interface wlo1
        ifindex 3
        wdev 0x1
        addr 30:e3:7a:ae:15:78
        ssid VM6290799
        type managed
        wiphy 0
        channel 44 (5220 MHz), width: 80 MHz, center1: 5210 MHz
        txpower 22.00 dBm
        multicast TXQ:
                qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                0       0       0       0       0       0       0       0               0

multicast TXQ was missing in PL.

Last edited by ad4ms3 (2020-12-22 12:24:31)

Offline

#4 2020-12-22 13:44:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,646

Re: NFS4 same setup, two different speeds

Please remove dolphin from the equation (don't even have it running because it could be due to one version trying to preview the target directory and the other doesn't)

Both laptops have SSD.

That's not really an answer  there's a bunch of shitty SSDs out there and there could also be parallel IO.

Obviously "WL" uses an 80Hz wide 5GHz channel and sends at 2 more dBm (on a logarithmic scale, so it's 100mW ./. 158mW)  -but I'm not convinced that would make the difference.
w/o a cable, simply get the "PL" device closer to the AP and see whether that makes a difference.

The MCTXQ is empty, so that shouldn't matter in any event.

Offline

Board footer

Powered by FluxBB