2001-07-11 23:50:47

by Laurent Itti

[permalink] [raw]
Subject: receive stats null for bond0 in 2.4.6

Hi all:

just installed 2.4.6 and all is well except that all stats in
/proc/net/dev are at zero on the receive side for our 3x100Mbps
channel-bonded network interface (bond0, using kernel module "bonding").
The interface works great (we do receive packets). Transmit side stats
appear ok. All stats also ok on the 3 ethernet boards that are enslaved
into the bond.

any idea? thanks!

-- laurent


bond0 = eth1 + eth2 + eth3 (eth0 is not enslaved).

[itti@iLab1 ~]$ cat /proc/net/dev
Inter-| Receive |
Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes
packets errs drop fifo colls carrier compressed
lo:1196053455 3162886 0 0 0 0 0 0
1196053455 3162886 0 0 0 0 0 0
bond0: 0 0 0 0 0 0 0 0
1178655990 11823521 0 0 0 0 0 0
eth0:1087068641 1222724 0 0 0 0 0 0
38597714 315369 3240 0 0 12601 6480 0
eth1:166095439 1917632 0 0 0 0 0 0
398336394 3941174 0 0 0 0 0 0
eth2:165918470 1916726 0 0 0 0 0 0
390110017 3941174 0 0 8 0 0 0
eth3:165932863 1921640 0 0 0 0 0 0
393562846 3941173 0 0 6 0 0 0


-----------------------------------------------------------------------
Laurent Itti - University of Southern California, Computer Science Dept
Hedco Neuroscience Building, HNB-30A - Los Angeles, CA 90089-2520 - USA
Email: [email protected] - Tel: +1(213)740-3527 - Fax: +1(213)740-5687
-----------------------------------------------------------------------



2001-07-12 00:26:53

by Jeff Golds

[permalink] [raw]
Subject: Re: receive stats null for bond0 in 2.4.6

Laurent Itti wrote:
>
> Hi all:
>
> just installed 2.4.6 and all is well except that all stats in
> /proc/net/dev are at zero on the receive side for our 3x100Mbps
> channel-bonded network interface (bond0, using kernel module "bonding").
> The interface works great (we do receive packets). Transmit side stats
> appear ok. All stats also ok on the 3 ethernet boards that are enslaved
> into the bond.
>
> any idea? thanks!
>

It's always zero because the bonding driver included with the Linux
kernel is pretty broken. The comments say that its stats are collected
from the slaves, but this is untrue. See the source code at
http://sourceforge.net/projects/bonding for how the stats should be
collected.

-Jeff

--
Jeff Golds
Sr. Software Engineer
[email protected]

2001-07-12 00:35:34

by Laurent Itti

[permalink] [raw]
Subject: Re: receive stats null for bond0 in 2.4.6

Hi Jeff:

> It's always zero because the bonding driver included with the Linux
> kernel is pretty broken. The comments say that its stats are collected
> from the slaves, but this is untrue. See the source code at
> http://sourceforge.net/projects/bonding for how the stats should be
> collected.

I'll check the source. Thanks! Used to work in previous kernels, so I'll
look for changes...

-- laurent

-----------------------------------------------------------------------
Laurent Itti - University of Southern California, Computer Science Dept
Hedco Neuroscience Building, HNB-30A - Los Angeles, CA 90089-2520 - USA
Email: [email protected] - Tel: +1(213)740-3527 - Fax: +1(213)740-5687
-----------------------------------------------------------------------

2001-07-12 18:52:48

by Thomas Davis

[permalink] [raw]
Subject: Re: receive stats null for bond0 in 2.4.6

Jeff Golds wrote:
>
> Laurent Itti wrote:
> >
> > Hi all:
> >
> > just installed 2.4.6 and all is well except that all stats in
> > /proc/net/dev are at zero on the receive side for our 3x100Mbps
> > channel-bonded network interface (bond0, using kernel module "bonding").
> > The interface works great (we do receive packets). Transmit side stats
> > appear ok. All stats also ok on the 3 ethernet boards that are enslaved
> > into the bond.
> >
> > any idea? thanks!
> >
>
> It's always zero because the bonding driver included with the Linux
> kernel is pretty broken. The comments say that its stats are collected
> from the slaves, but this is untrue. See the source code at
> http://sourceforge.net/projects/bonding for how the stats should be
> collected.
>

No, in 2.2, bonding collected stats by adding up the slave's stats, and
presenting that.

In 2.4, the stats was changed to be exactly what the bonding device has
seen.

Bonding device will never ever see anything to do with recieve packets.

--
------------------------+--------------------------------------------------
Thomas Davis | ASG Cluster guy
[email protected] |
(510) 486-4524 | "80 nodes and chugging Captain!"

2001-07-12 20:03:33

by Jeff Golds

[permalink] [raw]
Subject: Re: receive stats null for bond0 in 2.4.6

Thomas Davis wrote:
>
> Jeff Golds wrote:
> >
> > Laurent Itti wrote:
> > >
> > > Hi all:
> > >
> > > just installed 2.4.6 and all is well except that all stats in
> > > /proc/net/dev are at zero on the receive side for our 3x100Mbps
> > > channel-bonded network interface (bond0, using kernel module "bonding").
> > > The interface works great (we do receive packets). Transmit side stats
> > > appear ok. All stats also ok on the 3 ethernet boards that are enslaved
> > > into the bond.
> > >
> > > any idea? thanks!
> > >
> >
> > It's always zero because the bonding driver included with the Linux
> > kernel is pretty broken. The comments say that its stats are collected
> > from the slaves, but this is untrue. See the source code at
> > http://sourceforge.net/projects/bonding for how the stats should be
> > collected.
> >
>
> No, in 2.2, bonding collected stats by adding up the slave's stats, and
> presenting that.
>
> In 2.4, the stats was changed to be exactly what the bonding device has
> seen.
>
> Bonding device will never ever see anything to do with recieve packets.
>

So what's wrong with collecting the slaves' receive stats and reporting
them as stats for the bonding driver? At least then you can quickly see
the total for all devices currently owned by the bonding device.

Stats are just a tool so that you can see if things are behaving
properly, you can report back whatever you like. I prefer to have the
bonding driver collect the slaves' stats so you can easily see if
enslaved devices are receiving packets. If you want to see which device
is getting more traffic, that's easy to see by looking at the individual
slave.

-Jeff

--
Jeff Golds
Sr. Software Engineer
[email protected]

2001-07-12 20:24:30

by Thomas Davis

[permalink] [raw]
Subject: Re: receive stats null for bond0 in 2.4.6

Jeff Golds wrote:
>
> So what's wrong with collecting the slaves' receive stats and reporting
> them as stats for the bonding driver? At least then you can quickly see
> the total for all devices currently owned by the bonding device.
>
> Stats are just a tool so that you can see if things are behaving
> properly, you can report back whatever you like. I prefer to have the
> bonding driver collect the slaves' stats so you can easily see if
> enslaved devices are receiving packets. If you want to see which device
> is getting more traffic, that's easy to see by looking at the individual
> slave.
>

the person who ported the driver over to 2.4 from 2.2 made that choice.

It wasn't me. It was one of the network guys (Dave/Alexy/??).

One problem with collecting all the stats into the bonding driver -
which I have seen, is you can quickly start to overflow counters. And
they don't roll over.

--
------------------------+--------------------------------------------------
Thomas Davis | ASG Cluster guy
[email protected] |
(510) 486-4524 | "80 nodes and chugging Captain!"