[Click] DelayUnqueue 100% cpu

Eddie Kohler kohler at cs.ucla.edu
Tue Feb 5 17:40:17 EST 2008


Hi Mike,

Thanks for this bug report.  I agree that 100 milliseconds is way too high.

I've checked in a change that not only reduces this sleeping threshold, but 
also hopefully improves Click's timer precision overall.  The change adjusts 
Timer check frequencies based on observed lag (how slow the machine is).

Let me know if it works for you.
Eddie


Mike Scheutzow wrote:
> Problem
> 
> If I use either the DelayUnqueue or DelayShaper elements with Click 
> userlevel, my cpu usage always pegs at 100%.
> 
> This problem is present in both 1.6.0 and in the cvs repository 
> (checkout on Jan 31, 2008).
> 
> Solution
> 
> The bug is in the code which decides whether the thread should sleep or 
> not. A threshold of 100 milliseconds is way too high.
> 
> In elements/standard/delayunqueue.cc and 
> elements/standard/delayshaper.cc, I changed:
> 
> 	usec_to_subsec(100000)
> to:
> 	usec_to_subsec(100)
> 
> and everything works much better. Our kernel uses a 1 millisecond tick.
> 
> 
> Mike Scheutzow
> scheutzow at alcatel-lucent.com
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list