You are not logged in.
Hi guys,
so I have this i3 polybar module which is supposed to show me my download speed.
If I do test it with external speedtests, it always shows above 500 MB/s.
But in the module, it is never going above 3 MB/s, which is quite odd.
Can someone tell me how Arch measures my down speed? Where does the data the polybar module processes come from?
The module:
[module/wired-network]
type = internal/network
interface = name
interval = 3.0
format-connected = <label-connected>
format-disconnected = <label-disconnected>
format-packetloss = <label-connected>
; Default: %ifname% %local_ip%
label-connected = %downspeed:9%
label-connected-foreground = #eefafafa
; Default: (none)
label-disconnected = not connected
label-disconnected-foreground = #66ffffffI asked the maintainer, he has no clue either. That's why I'm hoping you guys on here can help me.
Offline
https://github.com/polybar/polybar/blob … rs/net.cpp looks like it's polling /sys/class/net/*/statistics/
What do you mean "the maintainer" has no clue? Do you think it's a good idea to use software where the person in charge doesn't know how it works?
Also
interface = namelooks garbage, according to https://github.com/polybar/polybar/wiki/Module:-network this should be some valid interface name. So I guess you're seeing some placeholder value (possibly driven by the suspiciously equal interval…)
Offline
If I do test it with external speedtests, it always shows above 500 MB/s.
Off topic but where on earth do you live where you can get a 4000Mb/s internet connection?
Offline
More specifically here it is reporting the actual download rate ... meaning the amount of bytes your system is actually downloading over a given time. Speedtests have an entirely different purpose of estimating your maximum capacity download rate. So these are really apples and oranges.
Theoretically, the polybar module should report comparable speed values over the specific duration of time that the external speed test is running as the speed test (attempts to) saturate your connection*. Similarly the polybar module should report comparable speed anytime you've saturated your network connection with any other operations (pacman system upgrade with multiple connections).
But then also note potential differences between MBps and Mbps. I would be quite surprised if any speed test said you were getting 500 MBps (if they did, I want your ISP ... or really, I'd sooner assume the speed test lied - did you happen to use a speed test provided by your ISP).
* Edit: and in reality, this is not likely to even happen as the polybar statistics may be collected with a longer sample duration. The speedtests only need to saturate your download connection briefly to get a semi-reasonable estimate of your bandwidth. But if this saturation does not cover the entire sampling window of the polybar monitor, polybar will show a substantially lower average rate over that time period.
Last edited by Trilby (2021-11-14 23:04:45)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
https://github.com/polybar/polybar/blob … rs/net.cpp looks like it's polling /sys/class/net/*/statistics/
Thank you, I will look into that.
What do you mean "the maintainer" has no clue? Do you think it's a good idea to use software where the person in charge doesn't know how it works?
nono, the maintainer is very capable and helpful. But I guess he does not have an answer to everything?
Also
interface = namelooks garbage, according to https://github.com/polybar/polybar/wiki/Module:-network this should be some valid interface name. So I guess you're seeing some placeholder value (possibly driven by the suspiciously equal interval…)
I put my real interface name there, problem still remains the same.
Offline
Tyskr wrote:If I do test it with external speedtests, it always shows above 500 MB/s.
Off topic but where on earth do you live where you can get a 4000Mb/s internet connection?
Whoops, it is 500Mb/s of course.
Offline
Let's get a realistic estimation, skipping weird online web-speedtests
wget -O /dev/null http://speedtest.frankfurt.linode.com/1GB-frankfurt.bin # I chose frankfurt because I speak enough danish…
wget -O ~/1GB-frankfurt.bin http://speedtest.frankfurt.linode.com/1GB-frankfurt.binWhat speed does wget report, does it matter whether you're downloading into dev/null or some actual file (slow disk issue)?
What does the polybar module report during this?
Offline
Ah ... was my post ignored? These are not expected to show even remotely close to similar results. So the fact that they don't doesn't indicate anything out of the ordinary. EDIT: comparing polybar and wget results with the above test may be relevant, but the sampling rate is still an issue that could scew the polybar data quite a bit (I suppose a 1GB test should last long enough to cover any reasonable sampling interval).
Last edited by Trilby (2021-11-15 13:43:10)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Let's get a realistic estimation, skipping weird online web-speedtests
wget -O /dev/null http://speedtest.frankfurt.linode.com/1GB-frankfurt.bin # I chose frankfurt because I speak enough danish… wget -O ~/1GB-frankfurt.bin http://speedtest.frankfurt.linode.com/1GB-frankfurt.binWhat speed does wget report, does it matter whether you're downloading into dev/null or some actual file (slow disk issue)?
What does the polybar module report during this?
Interesting..
wget -O /dev/null http://speedtest.frankfurt.linode.com/1GB-frankfurt.binreports ~ 100Mb/s. Doesn't matter if I download into some actual file, no difference here.
That is quite low, a 10th of what my ISP is promising me haha. How accurate is this though? I never tested my download speed with wget, only used 'weird online web-speedtests'. How come the latter shows me 800Mb/s?
The polybar module reacts accordingly to the wget command.
Offline
No, again, MB/s != Mb/s. Wget reports the former which is 1/8th of the latter. So if the MB/s reported by wget is 1/10th the value of Mbps your ISP is promising, you're actually in great shape getting 80% of the theoretical maximum (most of us don't get close to that).
And wget reported 100MB/s is exactly the same as what you report from other online tests saying you're getting 800Mb/s.
Last edited by Trilby (2021-11-15 18:21:30)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
No, again, MB/s != Mb/s. Wget reports the former which is 1/8th of the latter. So if the MB/s reported by wget is 1/10th the value of Mbps your ISP is promising, you're actually in great shape getting 80% of the theoretical maximum (most of us don't get close to that).
And wget reported 100MB/s is exactly the same as what you report from other online tests saying you're getting 800Mb/s.
Today I learned.
Offline
Offline
1B=8b
Not counting overhead. I usually figure a couple extra bits per byte for the protocol.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline