Why Download rate from nas is (almost) half in Ubuntu than Windows

I have a home NAS running OpenMediaVault 5 on a Raspberry PI, its not the best of all, but affordable and for me is enough.

My desktop "1" is a Lenovo S145, AMD Ryzen 5 3500 running Dual Boot Ubuntu 21.10 and Windows 10. Connected via WiFi (5,8 GHz) to my home network.

I am downloading a movie from NAS (1,2 GB).

When I download it in Ubuntu 21.10 I get a Rate near 7.7 MB/s.

When I download it in Windows 10 I get a Rate near 11.4 MB/s.

Same machine, same WiFi card and same NAS.

My desktop "2" is a Raspberry PI 4 8Gb running PoP OS 21.10. Connected via WiFi (5,8 GHz) to my home network. This is my Desktop of choice 95% of time.

When I download it in PoP OS 21.10 I get a Rate near 6.2 MB/s.

Just to illustrate, take a look on this graphic from NAS Server showing traffic on Lan port.

Activity graphic

First activity shows Ubuntu on Lenovo, second Windows 10 on Lenovo and third Pop OS on Raspberry PI.

The Second, Windows, hi rate and takes less time. The poor Raspberry PI (third) is the Lowest rate and takes more time.

Why is this different???

Thanks,

Cury


Check your WiFi MTU, using

ip link

or

ip l | grep $(ip r | awk '/default/ {print $5}' ) | awk '{print $2, $4, $5}'

also notice your WiFi interface's name.

The MTU (Maximum Transmission Unit) is the size of the largest packet that can be sent in a single network transmission. If a packet exceeds the MTU of a link, the data must be split into multiple packets (fragmented). These multiple packets must be sent over the link, received, acknowledged, and reassembled at the far end. If your link is misconfigured, and you have to fragment every packet you send, your actual data transfer rate drops.

Ethernet (wired) networks use an MTU of 1500 bytes.

Due to additional per packet overhead for WiFi (8 bytes PPPoE header), WiFi uses an MTU of 1492.

Your MTU should be set by your DHCP server, check your router's config.

You can set your own MTU (setting does not persist over restarts) with

sudo ip link set dev name mtu 1492

where "name" is the interface name from above.

Here's an example:

walt@squid:~(0)$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp63s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:21:7f:e5:1c brd ff:ff:ff:ff:ff:ff
3: wlxf46d04b1790f: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether f4:6d:04:b1:79:0f brd ff:ff:ff:ff:ff:ff
walt@squid:~(0)$   sudo ip link set dev wlxf46d04b1790f mtu 1492
[sudo] password for walt: 
walt@squid:~(0)$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp63s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:21:7f:e5:1c brd ff:ff:ff:ff:ff:ff
3: wlxf46d04b1790f: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether f4:6d:04:b1:79:0f brd ff:ff:ff:ff:ff:ff

My WiFi "interface name" is "wlxf46d04b1790f".