Replies: 3 comments 3 replies
-
or move to using one of the speedtest via cli tools and leverage that instead: side note, i personally run this docker to test connection periodically |
Beta Was this translation helpful? Give feedback.
-
Quick update since this came up again in Discord. Ookla's Speedtest CLI binaries are not FOSS and do not appear to be safe to redistribute, so those are right out. However, it looks like we may be able to use https://github.com/sivel/speedtest-cli/, which is a black-box Python implementation of a speedtesting service running against Ookla's public infrastructure. As a bonus, they have what appears to be a pretty simple python api so we may be able to just declare them as a dependency and go nuts. However, as good as that seems, my primary concern is that the opensource speedtest is not quite as reliable as ookla's first-party binaries. Plus, even with ookla's first party tools, I've personally had trouble always getting a reliable reading. Sometimes when it prioritizes by distance I get a crappier server that's technically closer to me but objectively worse, and even when I do get one that's good it's still hard to get the full sustained gigabit speeds I know my network can handle. . . and if our whole problem here is trying to get this to work more reliably on the upper-end of network connections, would swapping it out with speedtest really help? |
Beta Was this translation helpful? Give feedback.
-
With this python code, I get the correct speed. Works on Linux (and thus docker), needs libiperf.so, which is provided by iperf3. See https://iperf3-python.readthedocs.io/en/latest/
|
Beta Was this translation helpful? Give feedback.
-
utils/internetspeed.py
is a nice tool to measure Internet speed.The result is presented in the SABnzbd Wrench.It works nicely with normal CPU's and normal Internet speed. So with an i3 you can probably measure 1000 Mbps.
However if your Internetspeed is much more than your CPU, the measured speed is too low. And, note, while downloading, that CPU can achieve much higher than the incorrectly measured speed.
On a 8 Gpbs connection(even with a fast i9), utils/internetspeed.py measures 2 Gbps or so.
On a very slow CPU (like a NAS), and only 75 Mbps, utils/internetspeed.py just measures 5.9 Mbps
In both cases:
So:
EDIT: I see the iperf3 as ad additional tool/measurement; the current Internet speed measurement as "always-tool", the iperf3 as addtional ... if available and for the niche cases (low CPU, high Internet)
OK case:
OK CPU (pystone 125657), with about 800 Mbps Internet speed:
with about the same speed from iperf3
Edge cases: low cpu, high Internet
Slow CPU ... much too low measured speed:
... only 5.93 Mbps which is not correct.
... and perfect result with iper3
... so 83 Mbps, which is correct.
Synology:
VPS with 2-3 Gbps connection:
... but with iperf3:
so 3373 Mbps.
Beta Was this translation helpful? Give feedback.
All reactions