I just run some tests with Oaakla Speedtest to verify the hypothesis.
I have a 600/300 fiber line and used WLAN during the tests.
Linux Container on Docker Desktop with WSL2 backend:
docker run -it --rm gists/speedtest-cli speedtest --server-id=31469
Speedtest by Ookla
Server: Deutsche Telekom - Hamburg (id: 31469)
ISP: Deutsche Telekom AG
Idle Latency: 4.78 ms (jitter: 3.75ms, low: 4.08ms, high: 18.06ms)
Download: 418.28 Mbps (data used: 486.0 MB)
15.58 ms (jitter: 13.29ms, low: 3.48ms, high: 52.11ms)
Upload: 272.83 Mbps (data used: 461.9 MB)
20.92 ms (jitter: 14.73ms, low: 3.06ms, high: 239.08ms)
Packet Loss: 0.0%
Result URL: https://www.speedtest.net/result/c/2e67ef5c-e677-4b9c-a3e2-a58d828124df
Windows host:
d:\tmp>speedtest.exe --server-id=31469
Speedtest by Ookla
Server: Deutsche Telekom - Hamburg (id: 31469)
ISP: Deutsche Telekom AG
Idle Latency: 3.32 ms (jitter: 1.05ms, low: 3.13ms, high: 6.58ms)
Download: 635.35 Mbps (data used: 558.2 MB)
26.02 ms (jitter: 10.06ms, low: 6.24ms, high: 63.47ms)
Upload: 281.96 Mbps (data used: 312.8 MB)
6.29 ms (jitter: 6.90ms, low: 2.67ms, high: 55.94ms)
Packet Loss: 0.0%
Result URL: https://www.speedtest.net/result/c/37f80f9a-cd29-4581-9e2d-695834e71d9e```
WSL2 distro:
me@host ~$ ./speedtest --server-id=31469
Speedtest by Ookla
Server: Deutsche Telekom - Hamburg (id: 31469)
ISP: Deutsche Telekom AG
Idle Latency: 3.00 ms (jitter: 0.89ms, low: 2.72ms, high: 4.59ms)
Download: 629.47 Mbps (data used: 519.4 MB)
29.51 ms (jitter: 14.64ms, low: 8.60ms, high: 142.58ms)
Upload: 276.24 Mbps (data used: 288.3 MB)
9.05 ms (jitter: 8.26ms, low: 2.72ms, high: 72.50ms)
Packet Loss: 0.0%
Result URL: https://www.speedtest.net/result/c/b8780bc8-a95f-4fb4-9592-94d531d6d963
I repeated each test a couple of times, and had similar results in each environment. The results between on Windows and the WSL2 distribution are more or less on par (I usee networkMode=mirrored for WSL2).
The Linux container had a performance loss of 1/3 comared to the host/wsl2 disto when it comes to incoming traffic.
I am not sure how a GPU would be relevant for network performance. I can see how a container with greedy cpu consumption might starve other containers, or drive the system load in hights that make the WSL system vm irresponsive.
If you should give a new try, I would be currious how the output of top looks like inside the docker-desktop distro, and it’s system distro:
wsl -d docker-desktop top
wsl -d docker-desktop --system top
Anyhow, I am glad you found a solution that works for you.