netdev
[Top] [All Lists]

RE: RFC: NAPI packet weighting patch

To: "Ronciak, John" <john.ronciak@xxxxxxxxx>
Subject: RE: RFC: NAPI packet weighting patch
From: Mitch Williams <mitch.a.williams@xxxxxxxxx>
Date: Mon, 6 Jun 2005 16:55:19 -0700
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, mchan@xxxxxxxxxxxx, hadi@xxxxxxxxxx, buytenh@xxxxxxxxxxxxxx, "Williams, Mitch A" <mitch.a.williams@xxxxxxxxx>, jdmason@xxxxxxxxxx, shemminger@xxxxxxxx, netdev@xxxxxxxxxxx, Robert.Olsson@xxxxxxxxxxx, "Venkatesan, Ganesh" <ganesh.venkatesan@xxxxxxxxx>, "Brandeburg, Jesse" <jesse.brandeburg@xxxxxxxxx>
In-reply-to: <468F3FDA28AA87429AD807992E22D07E0450C00B@orsmsx408>
References: <468F3FDA28AA87429AD807992E22D07E0450C00B@orsmsx408>
Replyto: "Mitch Williams" <mitch.a.williams@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx

On Mon, 6 Jun 2005, Ronciak, John wrote:

> >     If you force the e1000 driver to do RX replenishment every N
> >     packets it should reduce the packet drops the same (in the
> >     single NIC case) as if you reduced the dev->weight to that
> >     same value N.
>
> But this isn't what we are seeing.  Even if we just reduce the weight
> value to 32 from 64, all of the drops go away.  So there seems to be
> other things affecting this.

Some quickie results for everybody -- I've been working on other stuff this
morning and haven't had much time in the lab.

Increasing the RX ring to 512 descriptors eliminates dropped packets, but
performance goes down.  When I mentioned this, John and Jesse both nodded
and said, "Yep.  That's what happens when the descriptor ring grows past
one page."

Reducing the weight to 32 got rid of almost all of the dropped packets
(down to < 1 per second); reducing it to 20 eliminated all of them.  In
both cases performance rose as compared to the default weight of 64.

Tests were run on 2.6.12rc5 on a dual Xeon 2.8GHz PCI-X system.  We run
Chariot for performance testing, using TCP/IP large file transfers with 10
Windows 2000 clients.

We're still looking at some methods of returning RX resources to the
hardware more often, but we don't have results on that yet.

> I also like your idea about the weight value being adjusted based on
> real work done using some measurable metric.  This seems like a good
> path to explore as well.


Agreed.  I think NAPI can be a lot smarter than it is today.

-Mitch

<Prev in Thread] Current Thread [Next in Thread>