From: Olivier Langlois <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: io_uring NAPI busy poll RCU is causing 50 context switches/second to my sqpoll thread
Date: Thu, 01 Aug 2024 19:05:34 -0400 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On Wed, 2024-07-31 at 02:00 +0100, Pavel Begunkov wrote:
>
> I forgot to add, ~50 switches/second for relatively brief RCU
> handling
> is not much, not enough to take 50% of a CPU. I wonder if sqpoll was
> still running but napi busy polling time got accounted to softirq
> because of disabled bh and you didn't include it, hence asking CPU
> stats. Do you see any latency problems for that configuration?
>
Pavel,
I am not sure if I will ever discover what this 50% CPU usage drop was
exactly.
when I did test
https://lore.kernel.org/io-uring/382791dc97d208d88ee31e5ebb5b661a0453fb79.1722374371.git.olivier@trillion01.com/T/#u
from this custom setup:
https://github.com/axboe/liburing/issues/1190#issuecomment-2258632731
iou-sqp task cpu usage went back to 100%...
there was also my busy_poll config numbers that were inadequate.
I went from:
echo 1000 > /sys/class/net/enp39s0/napi_defer_hard_irqs
echo 500 > /sys/class/net/enp39s0/gro_flush_timeout
to:
echo 5000 > /sys/class/net/enp39s0/napi_defer_hard_irqs
# gro_flush_timeout unit is nanoseconds
echo 100000 > /sys/class/net/enp39s0/gro_flush_timeout
ksoftirqd has stopped being awakening to service NET SOFTIRQS but I
would that this might not be the cause neither
I have no more latency issues. After a lot of efforts during the last 7
days, my system latency have improved by a good 10usec on average over
what it was last week...
but knowing that it can be even better is stopping me from letting
go...
the sporadic CPU1 interrupt can introduce a 27usec delay and this is
the difference between a win or a loss that is at stake...
https://lore.kernel.org/rcu/[email protected]/T/#m5abf9aa02ec7648c615885a6f8ebdebc57935c35
I want to get rid of that interrupt so hard that is going to provide a
great satidfaction when I will have finally found the cause...
next prev parent reply other threads:[~2024-08-01 23:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 20:05 io_uring NAPI busy poll RCU is causing 50 context switches/second to my sqpoll thread Olivier Langlois
2024-07-30 20:25 ` Pavel Begunkov
2024-07-30 23:14 ` Olivier Langlois
2024-07-31 0:33 ` Pavel Begunkov
2024-07-31 1:00 ` Pavel Begunkov
2024-08-01 23:05 ` Olivier Langlois [this message]
2024-08-01 22:02 ` Olivier Langlois
2024-08-02 15:22 ` Pavel Begunkov
2024-08-03 14:15 ` Olivier Langlois
2024-08-03 14:36 ` Jens Axboe
2024-08-03 16:50 ` Olivier Langlois
2024-08-03 21:37 ` Olivier Langlois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ba345b74c19fec2c19f05d2887c6315b0855a75.camel@trillion01.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox