Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2005 13:34:37 -0800 (PST)
From:      Danial Thom <danial_thom@yahoo.com>
To:        Drew Tomlinson <drew@mykitchentable.net>, Ted Mittelstaedt <tedm@toybox.placo.com>
Cc:        Michael Vince <mv@roq.com>, danial_thom@yahoo.com, freebsd-questions@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song)
Message-ID:  <20051212213437.52457.qmail@web33312.mail.mud.yahoo.com>
In-Reply-To: <439DDDDB.2080902@mykitchentable.net>

next in thread | previous in thread | raw e-mail | index | archive | help


--- Drew Tomlinson <drew@mykitchentable.net>
wrote:

> On 12/12/2005 8:13 AM Ted Mittelstaedt wrote:
> 
> >Michael,
> >
> >  Fundamentally, here's the problem Danial is
> claiming exists:
> >
> >it takes a certain amount of time to get the
> packet clocked in
> >from the network into the ethernet receiver. 
> This is hardware
> >dependent and cannot be changed.
> >
> >It takes a certain amount of time to get the
> packet out of
> >the hardware in the ethernet card into main
> ram, this also
> >hardware dependent and cannot be changed.
> (unless the device
> >driver is terribly inefficient, which we will
> assume it's not)
> >
> >Once in main ram, the information in the
> packet has to go through
> >a number of code statements.  The more code
> statements the
> >longer the information in the packet is
> sitting around in
> >the FreeBSD system's memory.
> >
> >It then takes a certain amount of time to get
> the information
> >out of main memory into the other sending
> ethernet nic's buffers,
> >
> >and it takes time to get it out of the sending
> nic back to the
> >wire.
> >
> >Danial is claiming the slowness is in the main
> ram section of
> >things, not in the ethernet driver code.
> >
> >polling makes the ethernet driver more
> efficient at high data
> >rates, but it does nothing for the speed of
> processing within
> >the TCPIP stack itself.  At low data rates
> polling is less
> >efficient than the interrupt method.  And
> unless the nic driver
> >is terribly inefficient to start with, the
> time it adds to the
> >packet path in the system is minor compared to
> the time spent
> >in the TCP/IP stack.
> >
> >Ted
> >  
> >
> 
> Thanks for the explanation.  So would polling
> be beneficial or 
> detrimental for a 100 mbps Ethernet card?  Not
> sure if 100 mbps is 
> considered "high" or "low" speed.  I'm
> specifically interested in 
> NetGear cards using the dc driver or DLink
> cards using the rl driver.

I don't think I'm claiming that at all. The
slowness is in the latency and inefficiencies of
the scheduler and whatever other kernel "stuff"
(locking, general overheads). The entire point of
the tests are that the managing of the packets is
a constant, in that its the same hardware and
mostly the same code. Now I suppose its possible
that the em driver could just be slower in 5.4
and 6.0, but the code is fundamentally the same,
so it should be a constant. So since the
processing of the packets is a constant, then if
you can process less packets on the same machine
the overhead of the OS must be the culprit. It
could be the code, particularly if you've
compiled with a different compiler, but there are
only slight variations in code performance
generally, unless some macro was changed that
say, efficts 100s of thousands of I/O operations
per second and adds a few cycles to each.

Polling is only beneficial if your ethernet card
actually interrupts for every event, which few
likely do. Intel cards (fxp and em driver) have
built-in hold offs so you get the supposed
benefits of polling without all the overhead. fxp
cards will never interrupt more then 6000 times
per second, and em cards have a tunable with the
default at 8000.

DT

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051212213437.52457.qmail>