linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* timerfd performances
@ 2021-01-18 16:10 Sebastien Laveze
  2021-01-22 12:30 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Laveze @ 2021-01-18 16:10 UTC (permalink / raw)
  To: linux-rt-users

Hi,

Since the removal of ktimersoftd which happened in 6f6ba7715a91
("softirq: rework"), I wonder what is the best approach when using
timer APIs relying on softirqs for wake-up.

My application polls on a timerfd, and I used to have good and stable
performance (< 100us) by setting a high priority to the appropriate
ktimersoftd. Now that the timer handling is handled in the unique
ksoftirqd I'm having increased latencies since (per my understanding)
the ksoftirqd is handling other things (in my use case, networking).

When I say increased latencies, with sufficient load (~450K fps UDP
traffic) it can be over a millisecond... And yet, I haven't added other
load handled in ksoftd like tasklets or IOs.

I tried raising the ksoftd prio over threaded interrupts, that helps a
bit but latencies are still high and setting ksoftd to a realtime
priority doesn't seem a viable option anyway.

I guess some tuning could also be done such as tuning the NAPI budget
but this doesn't seem very robust nor generic.

In the end, it seems my most viable option at the moment is to move to
clock_nanosleep() but it implies radical changes in my application
architecture as it's not as scalable and flexible as timerfd.

Any hints on how to "secure" the wake-up latency of timer fds or what
is expected in future works would be greatly appreciated !

Thanks,
Seb


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-22 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 16:10 timerfd performances Sebastien Laveze
2021-01-22 12:30 ` Sebastian Andrzej Siewior
2021-01-22 13:23   ` Sebastien Laveze
2021-01-22 14:07     ` Sebastian Andrzej Siewior

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).