Open fanquake opened 4 years ago
Might it be due to the interval being used not always being correct (e.g. sometimes there can be delays in the function being called).
It sounds like you're not able to easily reproduce the issue, but if you were, I'm curious if this https://github.com/rebroad/bitcoin/commit/5ff00f855a4ff6f4beb2cf36b74aebd00488fe62 would help.
Ported from: https://github.com/bitcoin/bitcoin/issues/10296. This has had little follow up / discussion, and may not even be an issue any more (tested version was 0.14.0).
Describe the issue
First Issue In Bitcoin Core 0.14.0 the Network Traffic graph in the Debug window displays erroneous traffic spikes when synchronizing the block chain. My internet connection is limited to 50 megabit/sec downstream yet the bursts are over 10 megabytes/sec, approximately twice the bandwidth that my internet connection should be capable of. Although theoretically my internal network could be buffering this traffic and sending it as a burst, these theoretical traffic bursts are not seen by the operating system's Task Manager or Resource Monitor applications therefor I believe it is safe to rule this out as the cause.
Second Issue When you press the Clear button in the Network Traffic graph, and no network activity is taking place, it will not render a graphic for the graph. After a period of time when network traffic does take place it will render a flat line followed by a graph of the traffic
Can you reliably reproduce the issue?
If so, please list the steps to reproduce below:
First Issue Replicate the environment, begin to download the block chain and watch the traffic graph window for hours. I'm sure you could save yourself a lot of time by doing this programmatically and have your code look for traffic spikes which would exceed the available internet bandwidth.
Second Issue Replication the environment, begin to download the block chain, wait for a period of no network traffic, press the clear button, wait for network traffic to resume.
Expected behaviour
First Issue The network graph should display accurate traffic statistics.
Second Issue The network graph should display a flat line during periods of no traffic
Actual behaviour
First Issue There are erroneous traffic spikes.
Second Issue A flat line is not displayed until traffic occurs after the graph has been cleared.
Screenshots.
First Issue Please be aware that there is also iSCSI and Remote Desktop Services traffic accounted for in the Task Manager/Resource Monitor graphs. Even with this extra traffic, Task Manager/Resource Monitor does not display the same 10+ megabyte/sec traffic spikes. Video of it happening with Task Manager - https://my.mixtape.moe/ugszqy.mp4 Screenshot of it happening with Resource Monitor:
Second Issue Video of it happening - https://my.mixtape.moe/gcazhi.mp4
What version of bitcoin-core are you using?
0.14.0
Machine specs: