Subject: Re: bpf/pcap performance
To: Darren Reed <darrenr@reed.wattle.id.au>
From: Guy Harris <guy@alum.mit.edu>
List: tech-net
Date: 04/08/2004 19:10:29
> * the application is threaded, one thread uses select over all the
>   NICs so it knows when to read data from BPF, the other writes to
>   disk.

The original BPF implementation didn't correctly support "select()" on 
BPF devices if you had a timeout on the device - "select()" wouldn't 
consider the BPF device readable until the hold buffer was non-empty, 
but the store buffer wasn't rotated into the hold buffer until it 
filled up, so "select()" would wait until the store buffer filled.

FreeBSD fixed that somewhere in the 4.x timeframe, and I *think* 
OpenBSD also has it fixed; NetBSD still doesn't have it fixed, as far 
as I know.

However, if packets are arriving fast enough that the store buffer 
fills up before the timeout expires, that *shouldn't* make a 
difference.