GeezerVison is showing github.com — io-wait used 100% cpu after 6.1.39 and 6.5.1 · Issue #943 · axboe/liburing
io-wait used 100% cpu after 6.1.39 and 6.5.1 #943DescriptionReacted by Sebastian Lövdahl, Ryosuke Fukutani, Philip Miglinci and Stanislav Activityredbaron commented on Sep 5, 2023 isn't IO wait time is what you want to see? That is time app is blocked waiting on io (at least it was the case for file IO), but CPU has nothing else to do, so that time is accounted as IO wait. isilence commented on Sep 5, 2023 Note that io-wait doesn't burn CPU cycles, it's sleeping and so it's not a problem apart from reporting. There was a change doing that, and I think it actually makes more sense reporting a task waiting for io_uring completions as io-wait axboe commented on Sep 5, 2023 Yes this is expected. iowait literally just means "waiting on IO", which is what the task is doing. It does NOT mean that it's busy 100% of the time, in fact if you have 100% iowait it means 1 task is sleeping waiting on IO 100% of the time. beldzhang commented on Sep 5, 2023
Yes this is expected. iowait literally just means "waiting on IO", which is what the task is doing. It does NOT mean that it's busy 100% of the time, in fact if you have 100% iowait it means 1 task is sleeping waiting on IO 100% of the time.
noticed that, when this happen, system load is only 0.0x
we are using io-uring in a storage service, so is very sensitive about the storage/network load, previously io-wait is a good indicator to check this.
and before kernel 5.0, iostat's %util value can be used also, but after 5.0, this number will easily up to 100% even on a small load. many articles also said this number is not reliable.
is there any other way to check the disk load?
and I calculate a performance score after each test based on total cpu usage, just ignore the io-wait part looks like not a good solution... beldzhang commented on Sep 13, 2023 looks no more comments, closed. romange commented on Nov 16, 2023 @axboe, one of Dragonfly's users, also reported this as a behavioural change: Dragonfly, which does not use disk IO, bumps up the IOWAIT metric to 100%. If they run it using the epoll API, it does not affect IOWAIT. I am just double checking whether this change is indeed intended. Reacted by rickytato and Juri Malinovski rickytato commented on Nov 25, 2023 I see same issue with Kernel 6.5.11 (on Proxmox)
 beldzhang commented on Dec 5, 2023 RX14 commented on Feb 22, 2024 IOwait has been traditionally thought of as "waiting for disk io", which will always complete. Since io_uring can be used to wait on the network, which has unbounded waiting time, it changes the metric considerably. For example, many monitoring systems have alerts for iowait being high, correctly or not assuming it to be a proxy for disk contention. Reacted by Christian Rishøj, Forza, Victor Babenko, Evan Sikorski and SaberStrat axboe commented on Feb 22, 2024 Here's what I think we should do:
- Default to not using iowait, as it is indeed somewhat confusing for networked or mixed network/storage workloads. I do think iowait is an awful metric that makes very little sense for async workloads, even just pure storage based ones. Lots of consumers will assume it's busy time, or has a direct correlation with disk usage, which is just wrong.
- Add an IORING_ENTER_IOWAIT flag that can be used in conjunction with IORING_ENTER_GETEVENTS. If set, iowait will be used. Storage can use this, if they so wish.
- Add an IORING_FEAT_IOWAIT flag, which tells the app/liburing that this feature is available.
- Add liburing helpers, ala io_uring_set_iowait() and io_uring_clear_iowait(), which can be used to toggle this flag, if IORING_FEAT_IOWAIT is set. Storage based workloads can set this.
And that should be it. That gives the app control over whether iowait should be used or not. Reacted by Stephanie Wilde-Hobbs beldzhang commented on Feb 22, 2024 isilence commented on Feb 24, 2024 @axboe, I just mentioned it in the mailing list, but even though I don't understand why people are taken aback by hi iowait from io_uring waiting, but I think we should just revert that change, there has been too many reports from different people regarding this one. We should be able to do the optimisation that was the reason for the change without reporting iowait. axboe commented on Mar 28, 2025
For me, CPU always sits at the lowest idle frequency, despite having 100% iowait.
Sounds like a machine/setup issue. It should avoid the lower power states on the CPU where that task is currently waiting. This isn't related to io_uring at all, io_uring just marks it as being in iowait, just like you'd see if iowait was used elsewhere.
Eg if you do:
# taskset -c 0 dd if=/dev/nvmeX of=/dev/null bs=4k iflag=direct
and watch the C state of CPU 0, then it should not be in lower power states. HanabishiRecca commented on Mar 28, 2025
Sounds like a machine/setup issue.
As I said above, tested on different machines. And it doesn't sound like an issue for me, exactly the opposite actually.
This isn't related to io_uring at all
Yes, I just pointed out that (for me) iowait does not bother the CPU.
Eg if you do:
# taskset -c 0 dd if=/dev/nvmeX of=/dev/null bs=4k iflag=direct
and watch the C state of CPU 0, then it should not be in lower power states.
Well, with this exact example - yes. But simply because with such small block size dd process itself produces a significant CPU load.
But if I change it to say bs=4M, I have 100% iowait with CPU remaining at the lowest state. axboe commented on Mar 28, 2025 Agree, sounds like it's working as expected then, for longer waits you very much do want to go lower in power. This should be the same then for anything waiting off io_uring_enter(2) with GETEVENTS set, that should also drift down in power states depending on the duration. ValeZAA commented on Apr 10, 2025
But if I change it to say bs=4M, I have 100% iowait with CPU remaining at the lowest state.
So there is no bug and this can be closed? What the patches for linux kernel for? It will be still be the same, just hidden? HanabishiRecca commented on Apr 10, 2025
So there is no bug and this can be closed?
Well, dd performs actual work here, it reads from the disk at max speed. So iowait metric is actually useful, shows how busy the disk I/O is.
But io_uring shows 100% iowait when literally nothing is happening. E.g. a server app simply waiting for incoming network requests.
What the patches for linux kernel for? It will be still be the same, just hidden?
Yes. beldzhang commented on Apr 10, 2025 patch already in kernel 6.15-rc1, 07754bfd9aee59063f8549f6e4d455eae636ecc7
and liburing master, commit: 8f0c124
tested yesterday, functionality pass.
Well, dd performs actual work here, it reads from the disk at max speed. So iowait metric is actually useful, shows how busy the disk I/O is.
But io_uring shows 100% iowait when literally nothing is happening. E.g. a server app simply waiting for incoming network requests.
that is what I meet and open this issue for.
So there is no bug and this can be closed?
since this reopened by @axboe, so I think it's better to let him decide. HanabishiRecca commented on Apr 10, 2025 Athinivas commented on May 21, 2025 @beldzhang Has the patch been released? anything decided ? Thanks! axboe commented on May 21, 2025 It'll be in the 6.15 kernel that's set to be released this weekend, and liburing has io_uring_set_iowait() for toggling it. axboe commented on May 21, 2025
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|