Help!!!About Channel Bonding!

Jakob Østergaard jakob at unthought.net
Fri Jun 22 00:18:26 EDT 2001


On Fri, Jun 22, 2001 at 06:57:48AM +0800, ÁõöÎ½Ü wrote:
> Hello,everyone
> I receive some instrunctions and check my setup again.I find that I can use
> two NIC in each machine,although the performance only increase 10~20%.The

Please measure with netperf (http://www.netperf.org/netperf/NetperfPage.html)
instead of rcp.

Attached to this e-mail is a very short Perl script I hacked up once to check
interface throughput.   Run this on your nodes while benchmarking, to see that
both/all cards both receive and transmit.

Some sample output from a 2-NIC machine running netserver (from the NetPerf package):
---------
ETH 0  RX: 11685.931640625 KB/sec  TX: 674.767578125 KB/sec
ETH 1  RX: 11785.884765625 KB/sec  TX: 673.419921875 KB/sec
ETH 0  RX: 11373.62890625 KB/sec  TX: 655.9453125 KB/sec
ETH 1  RX: 11648.318359375 KB/sec  TX: 656.234375 KB/sec
ETH 0  RX: 11609.3515625 KB/sec  TX: 676.587890625 KB/sec
ETH 1  RX: 11781.126953125 KB/sec  TX: 678.59765625 KB/sec
---------

> package loss a little relative to use only one NIC.I use "rsh somefile
> host:/home" to test.But if I use three NIC,the collision seems serious.One
> Card can not work and the other two have  bad performance.By the way,my
> kernal is 2.2.14-5.0 Mr Jobok tell me to check the "Trunking",but I do really

Ok - I am using 2.4.4 here - I don't know how well bonding works 2.2.
Comments, anyone ??

I suggest you run the attached script while either running rcp or netperf. It
will show whether your kernel properly sends data out on several NICs, and if
your switch properly transmits data to several NICs in each box.

If only one NIC does TX, either your configuration is wrong on the machine or
your kernel can't do proper bonding.   If only one NIC does RX, something's
wrong on the switch. Please let us know what you find out.

> not know how to check it.  And one more question is :is the VLan
> needed?Because of money,I only use one swither.

You can set trunking parameters in the switch setup (telnet to the switch).

VLan is *not* needed.

The switch will do what it is supposed to, if it's configuration is left
untouched.    If any special trunking/bundling configuration is done, it will
*not* work.    But if you don't know how to configure trunking, I guess you're
on the safe side - it should work for you then     ;)


> 
> Thanks for everyone !
> 


Indeed,   good luck   :)

-- 
................................................................
:   jakob at unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-------------- next part --------------
#!/usr/bin/perl -w
#
# Use and abuse as you see fit.
# Written in 2001 - by Jakob Oestergaard  (jakob at unthought.net)
#
# Log interface activity
#
# Inter-|   Receive                                                |  Transmit
#  face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
#    lo:   86008     684    0    0    0     0      0       0    86008     684    0    0    0     0       0        0
#  eth0:896249571 1017056    0    0    0     7     0       0 356538899  751902    0    0    0     0       0        0
#
# ^eth(\d+):(\d+)(\s+(\d+)){7}(\d+)(\d+(\d+)){7}\s*$
#
# Log $1 $2 $9
#
use strict;

my %oldrx = ();
my %oldtx = ();

while(1) {
    open(DF,"/proc/net/dev") or die "Couldn't open devfile";
    while(<DF>) {
	if(/^\s*eth(\d+):\s*(\d+)(\s+(\d+)){7}\s+(\d+)(\s+(\d+)){7}\s*$/) {
	    if(defined $oldrx{$1}) {
		my $rd = $2 - $oldrx{$1};
		$oldrx{$1} = $2;
		my $td = $5 - $oldtx{$1};
		$oldtx{$1} = $5;
		$td = $td / 1024;
		$rd = $rd / 1024;
		if($td >= 0 && $rd >= 0) {
		    print "ETH $1  RX: $rd KB/sec  TX: $td KB/sec\n";
		}
	    } else {
		$oldrx{$1} = $2;
		$oldtx{$1} = $5;
	    }
	}
    }
    sleep(1);
}


More information about the Beowulf mailing list