It is currently April 25th, 2024, 1:28 am

[Bug?] Network speeds show random spikes

Report bugs with the Rainmeter application and suggest features.
Rhyzettic
Posts: 3
Joined: October 12th, 2022, 3:56 am

[Bug?] Network speeds show random spikes

Post by Rhyzettic »

My maximum download speed is 43.75MB/s, yet the Rainmeter network measure randomly spikes up all the way to 60MB/s at times.
By default this happens rare enough for it to be acceptable, however, when I set the UpdateRate to 100 with an UpdateDivider of 10 in the measures, it happens more frequently.
This is the same for the upload speeds and setting the interface manually makes no difference.

Image

On the left is the default illustro network skin, completely unedited, and on the right is illustro with the only edit being UpdateRate=100 in the [Rainmeter] section; and UpdateDivider=10 added in the [measureNetIn] and [measureNetOut] sections.
I can't show it in pictures, but it happens noticeably more frequently to the one on the right.

I'm on a fully updated version of Windows 10, only use a single wired network connection, don't use a VPN or anything special, and no other program shows me reaching speeds surpassing 45MB/s.
It getting worse when changing the UpdateRate and UpdateDivider leads me to think it is an issue within Rainmeter, but I'm new to Rainmeter, so I don't quite know what is going on here?

Any advice on fixing this?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: [Bug?] Network speeds show random spikes

Post by SilverAzide »

Rhyzettic wrote: October 12th, 2022, 4:50 am My maximum download speed is 43.75MB/s, yet the Rainmeter network measure randomly spikes up all the way to 60MB/s at times.
By default this happens rare enough for it to be acceptable, however, when I set the UpdateRate to 100 with an UpdateDivider of 10 in the measures, it happens more frequently.
This is the same for the upload speeds and setting the interface manually makes no difference.

Image

On the left is the default illustro network skin, completely unedited, and on the right is illustro with the only edit being UpdateRate=100 in the [Rainmeter] section; and UpdateDivider=10 added in the [measureNetIn] and [measureNetOut] sections.
I can't show it in pictures, but it happens noticeably more frequently to the one on the right.

I'm on a fully updated version of Windows 10, only use a single wired network connection, don't use a VPN or anything special, and no other program shows me reaching speeds surpassing 45MB/s.
It getting worse when changing the UpdateRate and UpdateDivider leads me to think it is an issue within Rainmeter, but I'm new to Rainmeter, so I don't quite know what is going on here?

Any advice on fixing this?
You should not change the update rate or update divider on Net measures. These measures report usage in bytes per second, so they are basically taking "snapshots" at one second intervals and reporting how many bytes your network card transmitted during that interval. When you change the update rate, the snapshots are going to happen more frequently but the reporting of "bytes per second" will be wrong. See the final sentence in the "Per Second" paragraph in the Net documentation.

Spiky network behavior is not uncommon, and it does sometimes cause a skin to report things that might be impossible, like a gigabit network adapter reporting speeds higher than a gigabit. There isn't really anything that can be done by Rainmeter... it is simply telling you what your network adapter is telling Windows.

However, you do have a simple tweak you can make to smooth out the spikes and report more realistic behavior. Restore the skin's UpdateRate to 1000 and remove any UpdateDividers. Then, on all the Net measures, add the option AverageSize=2. This will smooth out your spikes (it will report the average of the last 2 values).
Gadgets Wiki GitHub More Gadgets...
Rhyzettic
Posts: 3
Joined: October 12th, 2022, 3:56 am

Re: [Bug?] Network speeds show random spikes

Post by Rhyzettic »

The Rainmeter documentation actually says the following instead:
Since the usual display of network traffic is in bytes per second, it is advisable to either set Update=1000 in the [Rainmeter] section of the skin, or add UpdateDivider options to NetIn / NetOut / NetTotal measures so they are updated once a second.
And with an Update rate of 100 and an UpdateDivider of 10, it would be once a second, just as the documentation describes I should do.
So technically nothing should be changing about the measurements, but it does appear to have some form of influence somehow... Either that, or I'm just tripping out on it, lol.

An AverageSize of 2 still is too spiky, but an AverageSize of 3 appears to make it return stable and proper values regardless of the Update rate.
Again, other software (Including Windows Task Manager) doesn't show these spikes for me, and Windows Task Manager for example doesn't appear to use an "AverageSize".

My OCD rather had more responsive numbers (the same as Windows Task Manager is able to show for example), but if an AverageSize of 3 is all there is to be done, then I'll just leave it at that!

I mainly wanted to know if it was normal or not, so thank you for your reply!
Rhyzettic
Posts: 3
Joined: October 12th, 2022, 3:56 am

Re: [Bug?] Network speeds show random spikes

Post by Rhyzettic »

Just as an update:

After tinkering with it a bit more and setting the documentation aside, I figured out a workaround that makes it give responsive accurate values for me personally, in case someone has the same issues and needs as me.

I set the Update rate to 120; with an UpdateDivider of 3 and an AverageSize of 4 in the measurements; and then multiplied the outcome of the measures by 2.5.
From there, I tweaked the multiplier a bit to account for the overheads and done! I seemingly have accurate and responsive readings.

I'm sure different Update rates work too, but those are the numbers I went for personally.