Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2004 14:38:02 -0500
From:      Bosko Milekic <bmilekic@technokratis.com>
To:        Charles Swiger <cswiger@mac.com>
Cc:        net@freebsd.org
Subject:   Re: polling(4) rocks!
Message-ID:  <20041117193802.GA23728@technokratis.com>
In-Reply-To: <0E8F462B-38CC-11D9-B242-003065ABFD92@mac.com>
References:  <20041117181351.GA48071@comp.chem.msu.su> <20041117185248.GA1394@grosbein.pp.ru> <0E8F462B-38CC-11D9-B242-003065ABFD92@mac.com>

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

On Wed, Nov 17, 2004 at 02:08:25PM -0500, Charles Swiger wrote:
> On Nov 17, 2004, at 1:52 PM, Eugene Grosbein wrote:
> >On Wed, Nov 17, 2004 at 09:13:51PM +0300, Yar Tikhiy wrote:
> >[ ...praise of polling(4)... ]
> >Does polling(4) increase latency? It is very imortant for router
> >that handles lots of RTP (VoIP) traffic.
> 
> Using polling does increase the latency of the traffic, slightly: if 
> you follow the recommended configuration and set HZ=1000 or so, the 
> added latency typically ends up being around 1ms.
>
> That's not enough to affect VoIP significantly.  I've got 12 VoIP phone 
> lines going through a FreeBSD 4.10 firewall using polling(4) over a T1 
> now.  The firewall box is a Dell P3/400MHz or so using fxp and a 
> quad-port card using the DEC 21x4x chipset.

  Latency is affected if in the case of using interrupts, it is lower
  than for polling.  If you plot a latency versus pps graph, for
  example, you might notice that in the case of interrupts, the curve
  keeps growing beyond a certain pps number, whereas in the case of
  polling it flattens out.  This happens because in the case of
  interrupts, more packets means more interrupts, always (assuming your
  card's coalescing abilities have been exhausted, i.e., very
  high pps, all the time), and more interrupts means more latency.  In
  the case of polling, more packets does not mean more interrupts, and
  the system will process them at a more or less constant rate.

> -- 
> -Chuck

-- 
Bosko Milekic
bmilekic@technokratis.com
bmilekic@FreeBSD.org



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