All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How many max kernel timers can run concurrently?
Date: Tue, 3 Oct 2017 14:07:08 +0200	[thread overview]
Message-ID: <20171003120708.GA22444@kroah.com> (raw)
In-Reply-To: <CAOC1hJnCypWgCbr5Go+TUwuog8xSin-Ahq4X4YH1ON+8V4Pm+g@mail.gmail.com>

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.

      reply	other threads:[~2017-10-03 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 11:43 How many max kernel timers can run concurrently? Swapnil N
2017-10-03 12:07 ` Greg KH [this message]

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=20171003120708.GA22444@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.