Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Sep 1998 06:17:23 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        net@FreeBSD.ORG
Subject:   Re: FreeBSD router performance 
Message-ID:  <Pine.BSF.3.91.980904055901.12656A-100000@labinfo.iet.unipi.it>
In-Reply-To: <6s9bnj$34e@walton.maths.tcd.ie> 

next in thread | previous in thread | raw e-mail | index | archive | help
[Cc to net@freebsd.org since i think it is somewhat interesting there]

On 29 Aug 1998, David Malone wrote:

> Subject: Re: FreeBSD router performance 
...
> >host and the router. However, when I measure throughput from one host to
> >the other, I'm only getting ~200Kbps. The router is obviously the
...
> You'd probably get a big improvement by buying two good PCI
> ethernet cards. The Digital tulip cards and the Intel Etherexpress

as others probably commented, in the above case there is some severe
misconfiguration problem.

This said, in the last days i have instrumented the networking code
to see how long it takes to output a packet (roughtly the last part
of ether_output() with the call to if_start, which is what you
generally get). Measured in Pentium 90 timer ticks, here are the
results:

    1K pkt, NE2000-PCI  ("ed" driver)		25.000 ticks
    512B pkt, NE2000-PCI  ("ed" driver)		15.000 ticks
    1K pkt, LANCE-PCI  ("lnc" driver)		5.000 ticks
    1K pkt, DE21140-PCI 100Mbit ("de" driver)	1.000 ticks

as a reference, a call to m_copy() on the same machine for a 1K pkt all
in an mbuf cluster takes about 700ticks.

On the "ed" driver, the driver itself has to make a copy of the packet
to the card using outsw(), so the time scales approx. linearly with pkt
size. The "lnc" driver is slightly better (although i am not sure if it
used a shared memory buffer on the card or direct DMA). Finally, the
21140 uses direct dma from the mbuf so it saves a lot of the copy
overhead.  If i can put my hands on other cards I will try to produce
more numbers.

Assuming you can expect an equivalent number of ticks in the receive
processing path and another 1000 or so ticks for forwarding (actually,
for bridging i have measured a shorter time), you can derive that on a
P5-90 you cannot expect to forward more than some 30.000 pkts/s (very
optimistic) with a "de" card, and more like 8-9000 pkts/s with a LANCE
(or a n "ed" and short pkts).
A faster machine might improve performance but not
certainly by more than 1 order of magnitude.

	cheers

-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980904055901.12656A-100000>