mimugmail / opn-repo

OPNsense repo by mimugmail
Other
325 stars 24 forks source link

Wildly different results with Speedtest by Ookla and speedtest-cli #185

Open sergeykad opened 8 months ago

sergeykad commented 8 months ago

The Ookla tests return result as I expect them to be while speedtest-cli returns much slower speeds.

The top line is Ookla and the rest is the cli. image

os-speedtest-community 0.9_4

Speedtest by Ookla 1.2.0.84 (ea6b6773cf) FreeBSD 13.2-RELEASE-p3 amd64 speedtest-cli 2.1.3 Python 3.9.18 (main, Oct 23 2023, 22:24:37) [Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc1238

mihakralj commented 8 months ago

I will assume you are targeting the same Speedtest server...

FreeBSD has a port of a legacy (Python-based) speedtest CLI that is open source and part of the default distribution. People do like to use it when transparency and OSS is their priority

Ookla published the (closed source) binary of much improved speedtest CLI which is not part of the regular FreeBSD but is available royalty-free and downloadable directly from Oookla's website.

Results are (predictably) rather different as Python-based legacy CLI uses only https test while Ookla binary uses websockets. All speedtest servers can serve both websockets and traditional https as part of the speedtest cycle.

Still, your results divergence is rather extreme; my suspicion is that https traffic from your router to Ookla servers traverses a different network path than websockets. Is the divergence of results the same regardless which speedtest server you target?

sergeykad commented 8 months ago

Thanks for the detailed explanation.

I used three different servers for the speedtest-cli tests above. The higher speed from the Ookla client is what I am usually getting on my other devices, so I did not have a reason to double check it.

I checked it again and noticed that the lists of servers for the different clients is not identical although there is an overlap. Strangely enough, after I switched now a few times from one client to another the drop-down for the cli client suddenly became empty.

robbbaxley commented 7 months ago

sergeykad, were you ever able to find and fix your "empty" drop-down issue in Speedtest? I have the same issue and can't find a way to fix the problem. I have tried to uninstall/install several times along with switching back and forth between Ookla and the legacy CLI without any difference.

mihakralj commented 7 months ago

perhaps I can help? go to /usr/local/opnsense/scripts/OPNsense/speedtest and execute ./opn_speedtest.py list You should get the list of servers available - that is the JSON that is then rendered on the web page.

If nothing is coming back, let's check what version of speedtest you are running. Execute ./opn_speedtest.py version - and you should either run Ookla binary or Python CLI. If you are on Ookla, run: speedtest --accept-license --accept-gdpr --servers if you are on Python CLI, run: speedtest --list

Where does the process break for you?

sergeykad commented 7 months ago

@robbbaxley Since the CLI version was returning unreliable results and is a legacy implementation I never bothered trying to fix it.