BPF
FreeBSD generally performs really well with packet acquisition. This is largely due to the simple and (in my opinion) elegant BPF
application programming interface that includes built-in timestamps and collective buffering. It has recently adopted a zero-copy
packet acquisition mechanism thanks to the work of Robert Watson and Christian Peron. Unfortunately, at the time these benchmarks
were done FreeBSD lacked zero-copy BPF. Additionally, at the time, FreeBSD lacked the ability to pin interrupt threads. This lead
to strange behavior with lower packet transfer rates on multiprocessor machines due to cache overhead (as the interrupt thread
migrates from processor to processor). Interrupt thread pinning is now supported in FreeBSD 8. 0 packet drop in a UP system with
device polling is due to the fact that we overflow into the NIC buffer which in turns dictates performance (which is much larger
than the 4K buffer I was using). I was using a (tiny) 4KB buffer in order to assist with a formal model a friend and I were
developing, which was the goal of this small project. Note that all tests were done on FreeBSD 6.1.
Benchmark Description
The machine is a Dell Optiplex 745. Packets were generated using the Linux packet generator (pktgen).
Results
Acknowledgements
Thanks to Jason Mader for letting me borrow a gigabit switch for a lot of the packet capture work I was doing.
© 2007 - 2011 Samy Al Bahra.