* cpu performance drop between 4.18 and 5.10 kernel?
@ 2024-05-22 7:44 mengkanglai
2024-05-22 11:08 ` Edward Cree
0 siblings, 1 reply; 2+ messages in thread
From: mengkanglai @ 2024-05-22 7:44 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Jiri Pirko, Simon Horman, Daniel Borkmann,
Sebastian Andrzej Siewior, Lorenzo Bianconi,
netdev@vger.kernel.org, open list
Cc: Fengtao (fengtao, Euler), Yanan (Euler)
Dear maintainers:
I updated my VM kernel from 4.18 to 5.10, and found that the CPU SI usage was higher under the 5.10 kernel for the same udp service.
I captured the flame graph and compared the two versions of kernels.
Kernel 5.10 compared to 4.18 napi_complete_done function added gro_normal_list call (ommit 323ebb61e32b4 ("net: use listified RX for handling GRO_NORMAL
skbs") Introduced), I removed gro_normal_list from napi_complete_done in 5.10 kernel, CPU SI usages was same as 4.18.
I don't know much about GRO, so I'm not sure if it can be modified in this way, and the consequences of such a modification?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: cpu performance drop between 4.18 and 5.10 kernel?
2024-05-22 7:44 cpu performance drop between 4.18 and 5.10 kernel? mengkanglai
@ 2024-05-22 11:08 ` Edward Cree
0 siblings, 0 replies; 2+ messages in thread
From: Edward Cree @ 2024-05-22 11:08 UTC (permalink / raw)
To: mengkanglai, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Jiri Pirko, Simon Horman, Daniel Borkmann,
Sebastian Andrzej Siewior, Lorenzo Bianconi,
netdev@vger.kernel.org, open list
Cc: Fengtao (fengtao, Euler), Yanan (Euler)
On 22/05/2024 08:44, mengkanglai wrote:
> Dear maintainers:
> I updated my VM kernel from 4.18 to 5.10, and found that the CPU SI usage was higher under the 5.10 kernel for the same udp service.
> I captured the flame graph and compared the two versions of kernels.
> Kernel 5.10 compared to 4.18 napi_complete_done function added gro_normal_list call (ommit 323ebb61e32b4 ("net: use listified RX for handling GRO_NORMAL
> skbs") Introduced), I removed gro_normal_list from napi_complete_done in 5.10 kernel, CPU SI usages was same as 4.18.
> I don't know much about GRO, so I'm not sure if it can be modified in this way, and the consequences of such a modification?
No, you can't just remove that call, else network RX packets will
be delayed for arbitrarily long times, and potentially leaked if
the netdev is ifdowned. The delay may also lead to other bugs
from code that assumes the RX processing happens within a single
NAPI cycle.
You could revert the commit, and if that improves performance for
you then more data would potentially be interesting.
You can also try altering sysctl net.core.gro_normal_batch;
setting it to 0 (or 1) should prevent any batching and in theory
give the same performance as reverting 323ebb61e32b4 — if it
doesn't then that's also a significant datum.
-ed
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-22 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 7:44 cpu performance drop between 4.18 and 5.10 kernel? mengkanglai
2024-05-22 11:08 ` Edward Cree
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).