Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 1999 22:23:07 -0500 (CDT)
From:      Mohit Aron <aron@cs.rice.edu>
To:        julian@whistle.com (Julian Elischer)
Cc:        freebsd-net@freebsd.org
Subject:   Re: paper on improving webserver performance
Message-ID:  <199907080323.WAA26783@cs.rice.edu>
In-Reply-To: <Pine.BSF.3.95.990707201159.23943j-100000@current1.whistle.com> from "Julian Elischer" at Jul 7, 99 08:13:38 pm

next in thread | previous in thread | raw e-mail | index | archive | help

> 
> It's definitly interesting.
> The comment about having compared against timer wheels is especially
> interesting given that Garrett has been working on replacing the TCP
> timers with timer wheels...
> 
> maybe he has some tricks up his sleave that win back some of the 
> difference...
> 


Perhaps the following would help. My implementation of timing wheels was
well optimized. To continue TCP to use integer variables, only a single event
was inserted into the timing wheel corresponding to all the TCP timers. This
event corresponded to the time that the earliest timer needed to fire. Further,
this event wasn't cancelled even if the TCP timers were. Thus TCP would set and
unset its timers by simply changing the integer variables.

When the handler for the timing wheel event fired, it checked all the TCP
timers and took corresponding action. After the action was taken for every 
timer, another event was inserted into the timing wheel that corrsponding to
the next earliest TCP timer that needed to fire.

To speed up the implementation further, the event inserted into the timing
wheel was allocated with the tcpcb structure - so there aren't any malloc or
free operations going on after the tcpcb structure is allocated.

Inspite of the above, the timing wheel still proved to be a little more costly
than the list based implementation. However, the timing wheel solution might
be the way to go if the clock granularity were to be made finer than 500ms.



- Mohit


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907080323.WAA26783>