[Bloat] high speed networking from userspace

Luigi Rizzo rizzo at iet.unipi.it
Tue Mar 13 15:08:38 EDT 2012


On Tue, Mar 13, 2012 at 09:03:57AM -0700, Stephen Hemminger wrote:
> On Tue, 13 Mar 2012 13:28:52 +0100
> Hagen Paul Pfeifer <hagen at jauu.net> wrote:
> 
> > 
> > On Mon, 12 Mar 2012 17:09:44 -0700, Dave Taht <dave.taht at gmail.com> wrote:
> > 
> > > is the by the same guy that did QFQ, and the results are quite
> > > impressive. He (today) announced support for this interface for Linux.
> > > 
> > > shades of VJ's 'network channels'!
> > 
> > "already" implemented:
> > 
> > see
> > 
> > o http://www.ioremap.net/node/12
> > o http://www.ioremap.net/taxonomy/term/6
> > 
> > and all netdev discussions several years ago.
> > 
> > HGN
> 
> User space networking works well for single application be it routing,
> bridging, network trading, or single appliance. It doesn't work on a
> multi-application environment (ie desktop). The gain is only because
> the userspace code can choose to do less, but do it faster. So if you
> want full stack, and firewall; don't bother.

The firewall is actually one place where an efficient I/O mechanism
is really useful. Netmap (or the netfilter API or netgraph in
FreeBSD, if they were not built on top of skbufs/mbufs) give you
an ideal place to efficiently drop rogue traffic, and reinject the
interesting one in the stack for further processing.

Also the concepts used in netmap (and in VJ's netchannel)
are not confined to userspace networking.
Even in the kernel one can and probably should:

- get rid of skbufs/mbufs even in the kernel (replacing
  them with cheaper containers or data copies)
- do more packet coalescing (software RSC is an example), to amortize
  certain costs over larger batches;
- move work away from the interrupt/polling threads and closer 
  to the user thread (for better cache locality and load management)
  
The real gain of these mechanisms, i think, is having the option
to avoid costly operations when you don't need them.

That's the message i would like to convey.

Of course everything would be more convincing if i came up
with a full skbuf-less in-kernel stack and not just the
bottom layer+libpcap :)

cheers
luigi



More information about the Bloat mailing list