kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How many max kernel timers can run concurrently?
@ 2017-10-03 11:43 Swapnil N
  2017-10-03 12:07 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Swapnil N @ 2017-10-03 11:43 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I am trying to implement a timer based stats notification for running
UDP streams. Mostly a timer per UDP session will send UDP statistics
to userspace via netlink.

I would like to know,
1. How many max number of kernel timers I can run simultaneously? I've
max 40K UDP sessions.
2. Will there be any performance impact when max number of timers are ticking?

-- 
~ Swapnil

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

* How many max kernel timers can run concurrently?
  2017-10-03 11:43 How many max kernel timers can run concurrently? Swapnil N
@ 2017-10-03 12:07 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2017-10-03 12:07 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Oct 03, 2017 at 05:13:09PM +0530, Swapnil N wrote:
> Hi All,
> 
> I am trying to implement a timer based stats notification for running
> UDP streams. Mostly a timer per UDP session will send UDP statistics
> to userspace via netlink.
> 
> I would like to know,
> 1. How many max number of kernel timers I can run simultaneously? I've
> max 40K UDP sessions.

Try it and see!

> 2. Will there be any performance impact when max number of timers are ticking?

Timers do not "tick", they either expire or are cancelled[1].  So the
impact is when other timers expire or are cancelled in the system, as
the internal data structures will have grown really large with all of
your new timers.

Are you sure a timer is what you want to use here?

good luck!

greg k-h

[1] Turns out something like 99% of all timers end up being cancelled
    and never expiring in a normal running kernel, which is the opposite
    of what the original data structures were designed for.

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

end of thread, other threads:[~2017-10-03 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 11:43 How many max kernel timers can run concurrently? Swapnil N
2017-10-03 12:07 ` Greg KH

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