Re: device polling takes more CPU hits??

From: Kelly Yancey (kbyanc_at_posi.net)
Date: 07/27/04

  • Next message: Kelly Yancey: "RE: device polling takes more CPU hits??"
    Date: Mon, 26 Jul 2004 19:57:49 -0700 (PDT)
    To: Luigi Rizzo <rizzo@icir.org>
    
    

    On Mon, 26 Jul 2004, Luigi Rizzo wrote:

    > On Mon, Jul 26, 2004 at 01:18:46PM -0700, Kelly Yancey wrote:
    > ...
    > > Out of curiousity, what sort of testing did you do to arrive at these
    > > settings? I did some testing a while back with a SmartBits box pumping
    > > packets through a FreeBSD 2.8Ghz box configured to route between two em
    > > gigabit interfaces; I found that changing the burst_max and each_burst
    > > parameters had almost no effect on throughput (maximum 1% difference).
    >
    > fast boxes are pci-bus limited, not CPU limited(*) so changing the burst
    > size (which basically amortizes some CPU costs) has little if any
    > effect.
    >
    > (*) this doesn't mean that the box cannot livelock, as depending on
    > the traffic on the bus, the CPU might stall for long intervals
    > waiting for bus transactions to complete, and becomes unable to
    > do anything at all. So you might still need polling.
    >
    > cheers
    > luigi
    >

      Oh, I found polling to be vastly superior to interrupts under load on
    the test machine. Not only did it avoid livelock, the throughput was
    about 10Mbps higher for small (64-byte) frames. I just didn't find much
    difference whether I used small burst sizes versus large burst sizes. It
    may have had to do with the fact that both the sending and receiving
    interfaces were gigabit em cards and were polling (no interrupts from the
    NICs at all).

      Kelly

    --
    Kelly Yancey  -  kbyanc@{posi.net,FreeBSD.org}  -  kelly@nttmcl.com
    Join distributed.net Team FreeBSD: http://www.posi.net/freebsd/Team-FreeBSD/
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: Kelly Yancey: "RE: device polling takes more CPU hits??"

    Relevant Pages

    • RE: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
      ... >> Well, if polling does no good for fxp, due to ... >> hardware doing controlled interrupts, ... >drop packets instead of going into livelock. ...
      (freebsd-questions)
    • Re: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
      ... Polling For 100 mbps Connections? ... the hardware doing controlled interrupts, then why does the fxp driver even let you set it as an option? ... They haven't, freebsd accounting doesn't work ... regarding the fxp driver and hardware. ...
      (freebsd-questions)
    • Re: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
      ... Polling For 100 mbps Connections? ... the hardware doing controlled interrupts, then why does the fxp driver even let you set it as an option? ... They haven't, freebsd accounting doesn't work ... regarding the fxp driver and hardware. ...
      (freebsd-questions)
    • RE: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
      ... Polling For 100 mbps Connections? ... The disadvantage is that it will drop packets when you have momentary bursts that would harmlessly put the machine into livelock. ... You can process # interrupts X ring_size packets; ... it is you who are throwing around the numbers - or were in your prior post - regarding the fxp driver and hardware. ...
      (freebsd-questions)
    • RE: Why is em nic generating interrupts?
      ... I believe the issue is that polling doesn't start ... >> an increase in interrupts, ... the code is meant to do this polling only under heavy load. ... buffers) into the user buffers in user space, or run the code in user space ...
      (freebsd-current)