Skip to content

CPUs with high iowait seem to be a reporting issue #216

Description

@xSetech

There's a comment on this thread that sums up what I'm seeing:
ghostty-org/ghostty#3224 (comment)

tldr: I'm seeing threads with "high iowait" in htop when the system is practically idle and there shouldn't be any i/o. This is a cosmetic issue that may be resolvable by passing a single flag to a single function.

According to my preferred language model, the technical reason for this "high iowait" is that nr_iowait is set for threads sleeping in io_cqring_wait(). There is a flag that can be passed to disable this marking; this was recommended by the same commenter in the thread mentioned above:
ghostty-org/ghostty#3224 (comment)

The commit that the commenter linked is the one that added the flag and it's worth reading:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.15-rc1&id=07754bfd9aee59063f8549f6e4d455eae636ecc7

By default, io_uring marks a waiting task as being in iowait, if it's
sleeping waiting on events and there are pending requests. This isn't
necessarily always useful, and may be confusing on non-storage setups
where iowait isn't expected. It can also cause extra power usage, by
preventing the CPU from entering lower sleep states.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions