netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: P@draigBrady.com
To: Jason Lunz <lunz@falooley.org>
Cc: netdev@oss.sgi.com, cpw@lanl.gov, luca.deri@netikos.com
Subject: Re: Luca Deri's paper: Improving Passive Packet Capture: Beyond Device Polling
Date: Tue, 06 Apr 2004 11:30:19 +0100	[thread overview]
Message-ID: <407286BB.8080107@draigBrady.com> (raw)
In-Reply-To: <c4rvvv$dbf$1@sea.gmane.org>

Jason Lunz wrote:
> hadi@cyberus.ca said:
> 
>>Jason Lunz actually seemed to have been doing more work on this and
>>e1000 - he could provide better perfomance numbers.
> 
> 
> Well, not really. What I have is still available at:
> 
> http://gtf.org/lunz/linux/net/perf/
> 
> ...but those are mainly measurements of very outdated versions of the
> e1000 napi driver backported to 2.4, running on 1.8Ghz Xeon systems.
> That work hasn't really been kept up to date, I'm afraid.
> 
> 
>>It should also be noted that infact packet mmap already uses rings.
> 
> 
> Yes, I read the paper (but not his code). What stood out to me is that
> the description of his custom socket implementation matches exactly what
> packet-mmap already is.
> 
> I noticed he only mentioned testing of libpcap-mmap, but did not use
> mmap packet sockets directly -- maybe there's something about libpcap
> that limits performance? I haven't looked.

That's my experience. I'm thinking of redoing libpcap-mmap completely
as it has huge amounts of statistics messing in the fast path.
Also the ring gets corrupted if packets are being received while
the ring buffer is being setup.

I've a patch for http://public.lanl.gov/cpw/libpcap-0.8.030808.tar.gz
here: http://www.pixelbeat.org/patches/libpcap-0.8.030808-pb.diff
(you need to compile with PB defined)
Note this only addresses the speed issue.
Also there are newer versions of libpcap-mmap available which I
haven't looked at yet.

> What I can say for sure is that the napi + packet-mmap performance with
> many small packets is almost surely limited by problems with irq/softirq
> load. There was an excellent thread last week about this with Andrea
> Arcangeli, Robert Olsson and others about the balancing of softirq and
> userspace load; they eventually were beginning to agree that running
> softirqs on return from hardirq and bh was a bigger load than expected
> when there was lots of napi work to do. So despite NAPI, too much kernel
> time is spent handling (soft)irq load with many small packets.

agreed.

> It appears this problem became worse in 2.6 with HZ=1000, because now
> the napi rx softirq work is being done 10X as much on return from the
> timer interrupt.  I'm not sure if a solution was reached.

Pádraig.

  reply	other threads:[~2004-04-06 10:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-30 14:23 Luca Deri's paper: Improving Passive Packet Capture: Beyond Device Polling Yusuf Goolamabbas
2004-04-03 23:02 ` jamal
2004-04-05 16:03   ` Jason Lunz
2004-04-06 10:30     ` P [this message]
2004-04-06 12:25       ` Luca Deri
2004-04-06 16:01         ` Jason Lunz
2004-04-06 18:40           ` Ben Greear
     [not found]         ` <1081262228.1046.25.camel@jzny.localdomain>
2004-04-07  6:59           ` Luca Deri
2004-04-07 12:20             ` jamal
     [not found]         ` <E1BAt0s-0003V8-00@crown.reflexsecurity.com>
2004-04-07  7:11           ` Luca Deri
2004-04-06 14:18     ` jamal
2004-04-06 15:31       ` Robert Olsson
2004-04-07  7:03         ` Luca Deri
2004-04-07 15:11           ` [Ntop-misc] " Robert Olsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=407286BB.8080107@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=cpw@lanl.gov \
    --cc=luca.deri@netikos.com \
    --cc=lunz@falooley.org \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).