pstop icon indicating copy to clipboard operation
pstop copied to clipboard

`upload` and `download` columns in the `Net` panel are switched

Open zbynekwinkler opened this issue 7 months ago • 3 comments

It seems that the upload and download columns in the Net panel are switched.

zbynekwinkler avatar Apr 16 '26 09:04 zbynekwinkler

Hey @zbynekwinkler, good catch! You were right, the columns were effectively showing swapped values.

What was happening:

The Net tab was using Windows GetProcessIoCounters (ReadTransferCount / WriteTransferCount) to populate the Download and Upload columns. The problem is these counters track all I/O, not just network traffic. So when a process downloads a file, the disk writes from saving that file to cache inflate the WriteTransferCount, making the Upload column show values equal to or higher than Download. A browser downloading at 5 MB/s would show something like Download: 5.0 MB/s and Upload: 5.2 MB/s because the downloaded data also gets written to disk cache.

From the user's perspective, seeing Upload >= Download during a download makes it look like the columns are switched compared to what the header bar shows (which uses true network counters).

The fix (0ca65f5):

Per process I/O rates are now scaled by the actual system wide network throughput reported by sysinfo. Each process's share of the total download/upload is proportional to its I/O activity among all processes with active connections. This keeps the Download and Upload columns directionally consistent with the header bar network meter.

Also improved the header bar format to ↓{value} ↑{value} for clearer direction indication.

Updated in latest master. Thanks for reporting this!

psmux avatar Apr 18 '26 11:04 psmux

Hope the problem got solved. Closing this assuming it did

psmux avatar Apr 22 '26 04:04 psmux

I've upgraded to 0.5.4 (I am not sure if it got the fix though).

Windows task manager says my combined download speed on wifi interface is around 51 Mbps. That should be somewhere around 6.3MB/s. That is also in the same ballpark as can be expected given my connection to the internet. However pstop reports download speeds in excess of 15 MB/s (if I sum all all processes). So something still seems to be adrift there.

But hey, download is now the bigger number so we are moving in the right direction. Jokes aside, thanks for this useful tool. I hope my testing can add a little value here.

zbynekwinkler avatar May 18 '26 09:05 zbynekwinkler