lkml.org 
[lkml]   [1999]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux and Network Flight Recorder
On Thu, Jun 24, 1999 at 05:13:42PM +0200, kuznet@ms2.inr.ac.ru wrote:
> > The other guess is that they are suffering a bit from the synchronous copy
> > (BPF does the copy asynchronously in the kernel while the system is waiting
> > for IO etc.).
>
> ?? BPF is pretty dumb system copying data twice. The first is copy to buffer
> (Linux has not this stage at all), the second is equivalent to Linux way.

I was under the impression that they used some hack to mmap a kernel
ring buffer via a character device. Someone is implementing that on Linux
too, although I tried to talk them out of it (and put their time into a better
libpcap instead). Their code will run in the IRQ at the end and probably
be rather similar to turbopacket.


>
> > This could be fixed by a libpcap that uses a few worker threads
> > for packet recvmsg'ing.
>
> I do not remember a case, when threads helped to get CPU ticks magically.
> It really helps to reduce latency a bit by using blocking io instead of
> poll/read, but it is inessential when doing bulk work. NFR spends
> lots of time analyzing packets, copies lots of useless data,
> system overhead is negligible.

And lots of time writing data to disk + a complex multi process setup.
Some gaps inbetween where there are wasted cycles in waiting wouldn't
be that surprising. The multithread model also has the advantage that
it keeps the kernel packet queues short (ok, I could increase the rcvbuf
to a very huge value, but I would prefer to do that in a user space ring
buffer)


-Andi

--
This is like TV. I don't like TV.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.049 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site