-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network rate incorrect, depended on refresh interval. #1894
Comments
This comment has been minimized.
This comment has been minimized.
OK, there is big miscommunication. Process Hacker displays "rate" and "MB/s", this is different form "data in interval" or "data since last update" and "MB". In your car example with 1s refresh interval: There are there are 20 m per refresh interval and there are 20 m since last update and there are 20 m per second being travelled, this is where we agree with each other. In case of 2s refresh interval: There are now 40 m per refresh interval, or 40 m since last update being travelled, yes, this is correct. But there are still 20 m per second travelled no matter the refresh interval. The word "per" in English means "to divide by". So 40 meters travelled per 2 seconds means speed (or rate) of 20 m/s, it still means 40 m since last update.
10 or 20 or what? Units matters! Showing 20 MB downloaded since last update is indeed correct. Showing 20 MB downloaded per refresh interval is indeed correct. Showing 20 MB/s downloaded is incorrect, this is where we don't understand each other.
By my math 5 m + 15 m is equal to 20 m. Where does the 40 m value comes from? Correct is to show 20 m since last update, or 20 m per update interval, or 10 m/s. I expected this is exactly what the "bytes in interval" and "bytes per second" columns are for. This is what I suggested to be added back in 2011 at http://processhacker.sourceforge.net/forums/viewtopic.php?f=14&t=346 and now when I'm developing a network application, I noticed it is broken. Marek |
Added by commit number c25ae6a 12 years ago. |
I think you both are right here. There is an improvement we can make to Before I go further. I need to remind us this fact - In most circumstances System Informer is an external observer to activity on the system. We are not inline nor are we probing specific activity to take a measurement. And as with most things in computation there are tradeoffs between the accuracy and performance. Calculation of any rate can be estimated independent of the period between measurements. And as the period of measurement approaches infinity, your calculation becomes more accurate (you might know this as the derivative). To perform this calculation you need two things. The difference in measured information and the difference in time between those measurements. With these two things you can adjust to represent the rate of change in terms of any related period unit (in this case time, milliseconds to seconds). This approach is taken all over computation, you might be familiar thinking of this in terms of game engines where activity is updated each "game tick" but must account for "delta time" in their computation. The commit you linked (c25ae6a) does this. As does the code on master. It could be improved as it assumes the update interval is the period, which may not always be the case. In reality I think we should be capturing the delta time instead of relying on the configured update interval. This would give us a more accurate estimation. We already do this in the main binary for many of the other calculations. Said practically, this rate will be inaccurate if you manually refresh (e.g. using |
Fixed in latest canary build |
Not fixed yet. Version |
Brief description of your issue
Network total rate column in process list and total rate in column in network list says network rate, but in reality they display bytes in interval, not rate. This is no problem in case of one second refresh interval. But it is problem in case of other refresh intervals.
Steps to reproduce (optional)
Expected behavior (optional)
The network rate of your application is the same, regardless of refresh interval. If it was 1 MB/s it is still 1 MB/s.
Actual behavior (optional)
The network rate of your application is now 2x or 10x times the reality. If it was 1 MB/s before, it is 2 MB/s or 10 MB/s now. That is a bug. The program says rate, but displays data amount since last refresh instead. Resource Monitor (perfmon.exe) confirms that the application under test actually did not change amount of data transferred as reaction to changing refresh interval in System Informer.
Environment (optional)
The text was updated successfully, but these errors were encountered: