htop-dev / htop

htop - an interactive process viewer
https://htop.dev/
GNU General Public License v2.0
6.15k stars 416 forks source link

Allow Disk IO meter to be above 100% #1374

Open gooncreeper opened 6 months ago

gooncreeper commented 6 months ago

The latest htop version has capped the Disk IO meter at 100%, which is quite annoying as there is currently no per-disk utilization meter (#952) and doesn't seem like there will be one for a while. Allowing the Disk IO meter to be above 100% is useful if you have a disk that is always running at 100%, allowing you to see if other disks are running. This functionality was removed with 89b90c4

BenBE commented 6 months ago

@Explorer09 I think the patch should be supplemented to be scaled by the number of disks / multiple of 100% per disk.

Explorer09 commented 6 months ago

If there is one percentage for the disks, it should show the average percentages of all disks, not the "number of disks times 100%". Although the latter info might be useful, it isn't what average people think "percentage" for.

If you want the latter information, how about displaying as "x of y disks" in text display mode?

gooncreeper commented 6 months ago

Averaging the total Disk IO would be less useful in most cases. For example, if you wanted to see how many disks are running at maximum, you would have to account for how many storage devices you have and multiply, but with a sum you could just look at the hundreds place. Additionally, having the Disk IO as a total would be more in line with the read and write statistics, which are totals of all the disks.

Explorer09 commented 6 months ago

Averaging the total Disk IO would be less useful in most cases. For example, if you wanted to see how many disks are running at maximum, you would have to account for how many storage devices you have and multiply, but with a sum you could just look at the hundreds place. Additionally, having the Disk IO as a total would be more in line with the read and write statistics, which are totals of all the disks.

I mean the percentage bar would show the average of all disk. But in the text display mode, add a "x out of y disks spinning" text.

gooncreeper commented 6 months ago

But in the text display mode, add a "x out of y disks spinning" text.

Ah I see, your original phrasing made it seem like it would be something like "320% of 4 disks." (which is more confusing than just a percentage)

"x of y disk spinning" would solve the problem of seeing how many disks are running, though we would have to consider what spinning means for non-rotational devices. "x of y disks running" would probably be better (we just tally how many disks have been read/written to since the last refresh.) We could also offer both and having "spinning" apply only to rotational devices.

I mean the percentage bar would show the average of all disk.

Having a sum of all the disk percentages would still be better since the user wouldn't have to account for how many storage devices they have. If you had two disks but only use one, you probably wouldn't want the unused disk to half the percentage. I suppose a possible solution to that is only accounting mounted disks, though most systems might automatically mount disks you never use.

rawhide-kobayashi commented 5 months ago

What exactly was the rationale for changing this in the first place...?

Readings of >100% have their basis in the multi-core load average measure since the beginning of time itself.

With 30+ disks in my system "100%" disk IO is completely useless. It's never below 100% unless it's completely idle. The previous additive behavior was a useful at-a-glance indicator of total system disk busy time. It was literally perfect.

Explorer09 commented 5 months ago

@rawhide-kobayashi For multi-disk systems, the maximum value for the Disk IO meter should be (100% × number of disks), or the percentage should show the "normalized" one (i.e. divided by the number of the disks). So the value has been wrongly implemented in the first place.

I cannot make the decision on what the percentage should represent. My idea is the text should be "x of y disks busy" and not the percentage.

gooncreeper commented 5 months ago

@rawhide-kobayashi For multi-disk systems, the maximum value for the Disk IO meter should be (100% × number of disks), or the percentage should show the "normalized" one (i.e. divided by the number of the disks).

Is there any good reason for normalizing the percentage?