[Click] NSClick - performance upgrade for NS-2

Eddie Kohler ekohler at gmail.com
Wed Jan 25 15:15:01 EST 2012


Some other notes:

On 1/20/12 7:09 AM, Björn Lichtblau wrote:
> Hello Wim,
>
> i'd like to also highlight what you've pointed out in your PS:
>
> On 01/18/2012 04:25 PM, Wim Vandenberghe wrote:
>> PS: I also noticed that using a QuickNoteQueue instead of a standard
>> Queue improves performance since the run_task of the tosimdevice will
>> halt quicker when there are
>> no more packets left in the queue
>
> This is also something i observed and what was buried in my notes. It
> tracks down to FullNoteQueue::pull_failure() in
> elements/standard/fullnotequeue.hh. FullNoteQueue tries to "busy wait"
> SLEEPINESS_TRIGGER (9) times before going to sleep, which always results
> in 10 ping-pongs between sim and click although the queue is empty and
> won't get filled in the sim environment. I'm curious what this code is
> for, some kind of concurrent lock-waiting optimization?! Is this
> behaviour common in more places, and an easy way to fix that on click's
> side for the sim?

It might be reasonable to set SLEEPINESS_TRIGGER to 0 in ns. I don't 
love this approach, though.

The sleepiness trigger is addressing the problem of deceptive idleness 
in scheduling. When in heavy usage, it was faster to keep an element 
scheduled than to unschedule it, after which the Click thread might go 
to sleep as a whole.

Click's inner scheduling loop is quite fast. My guess is that NS's is 
not as fast. If the problem was event pileup, then we just should fix 
that problem.

Eddie


More information about the click mailing list