Hashed and hierarchical timing wheels: Efficient data structures for implementing a timer facility

  • Varghese G
  • Lauck A
  • 26


    Mendeley users who have this article in their library.
  • 21


    Citations of this article.


The performance of timer algorithms is crucial to many network
protocol implementations that use timers for failure recovery and rate
control. Conventional algorithms to implement an operating system timer
module take O(n) time to start or maintain a timer, where n is the
number of outstanding timers: this is expensive for large n. This paper
shows that by using a circular buffer or timing wheel, it takes O(1)
time to start, stop, and maintain timers within the range of the wheel.
Two extensions for larger values of the interval are described. In the
first, the timer interval is hashed into a slot on the timing wheel. In
the second, a hierarchy of timing wheels with different granularities is
used to span a greater range of intervals. The performance of these two
schemes and various implementation tradeoffs are discussed. We have used
one of our schemes to replace the current BSD UNIX callout and timer
facilities. Our new implementation can support thousands of outstanding
timers without much overhead. Our timer schemes have also been
implemented in other operating systems and network protocol packages

Author-supplied keywords

  • Callout facilities
  • Hashed wheels
  • Hierarchical wheels
  • Protocol implementations
  • Timer Facilities
  • Timers

Get free article suggestions today

Mendeley saves you time finding and organizing research

Sign up here
Already have an account ?Sign in

Find this document


  • George Varghese

  • Anthony Lauck

Cite this document

Choose a citation style from the tabs below

Save time finding and organizing research with Mendeley

Sign up for free