[Click] _iters_per_os in routerthread

Eddie Kohler kohler at cs.ucla.edu
Fri Mar 19 13:05:12 EDT 2010


Hi Ian,

(1) I would completely appreciate seeing your config, just to see if 
there's anything that might cause the extra CPU usage.  BUT:

(2) _iters_per_os is set that way just, I think, as a random guess.  ANd 
that guess is at least 5 years old and probably more.  I think it would 
be OK to set it to 2 for everyone.

Eddie


On 3/18/10 8:06 PM, Ian Rose wrote:
> Hi all -
>
> In lib/routerthread.cc there is the following code:
>
> #if CLICK_USERLEVEL
>       _iters_per_os = 64;           /* iterations per select() */
> #else
>       _iters_per_os = 2;          /* iterations per OS schedule() */
> #endif
>
> I'm curious if there is a particular rationale behind the value 64 for
> userlevel click.  Is it simply the case that this value works pretty
> well for most of the typical click configurations that were tested?  In
> my (admittedly brief) testing, it appears that this parameter choice
> imposes a CPU overhead of ~3x for [some?] select-heavy applications, by
> which I mean configs that spend most of their time calling selected() on
> elements, rather executing tasks or timers.  For example, my particular
> app uses around 15-20% CPU with the above values, but if I change the 64
> to a 2, the CPU usage drops to 5-6%.
>
> Obviously this might simply be a case of the default parameters not
> being particularly good for my specific situation, but I thought I'd
> check since the performance difference seemed pretty significant.
>
> cheers,
> - Ian
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list