Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@I-Al-Istannen
Copy link

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

If the cpu is spending a lot of time in iowait, it is still idle but some process is waiting on io. The system itself is not under load.

This is especially annoying with ghostty, as it spends most time waiting on io_uring, which drives up the CPU usage reported by polybar to around 50% or more. Other system monitors, such as htop or btop, do not count iowait towards utilization and only report ~5% CPU utilization instead.

This is discussed in more detail at ghostty-org/ghostty#3224.

The kde system monitor was recently adjusted to behave similarly: https://invent.kde.org/plasma/ksystemstats/-/merge_requests/104/.

I also removed the accounting for steal. I am not sure how to treat it, but it seems pretty specialized? I can re-add it though, if you prefer that.

Related Issues & Documents

ghostty-org/ghostty#3224
https://invent.kde.org/plasma/ksystemstats/-/merge_requests/104/.

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

As far as I can tell the behaviour isn't actually documented anywhere, but maybe I missed it.

If the cpu is spending a lot of time in iowait, it is still idle but
some process is waiting on io. The system itself is not under load.

This is especially annoying with ghostty, as it spends most time waiting
on io_uring, which drives up the CPU usage reported by polybar to around
50% or more. Other system monitors, such as htop or btop, do not count
iowait towards utilization and only report ~5% CPU utilization instead.

This is discussed in more detail at
ghostty-org/ghostty#3224.

The kde system monitor was recently adjusted to behave similarly:
https://invent.kde.org/plasma/ksystemstats/-/merge_requests/104/.
@I-Al-Istannen I-Al-Istannen marked this pull request as ready for review March 1, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant