FreeBSD’s if_bridge suffered from contention on a single mutex, which
seriously limited throughput. Thanks to FreeBSD Foundation sponsored work this
bottleneck was removed, resulting in throughput improvements of 5x (and more
in certain setups).
FreeBSD’s if_bridge is used to link Ethernet interfaces together, much as a
physical Ethernet switch would. The previous implementation suffered from
contention on a single mutex and performed much worse than one would hope, to
the extent that FreeBSD could route packets much faster than it could switch
them.
This talk discusses the work done to resolve this bottleneck, the approach
taken, problems encountered during this process and the final results.
The solution relies heavily on ConcurrencyKit’s epoch framework and its
implementation in FreeBSD. We will also discuss how this works.
About Kristof Provost
Kristof is a freelance embedded software engineer specialising in network and
video applications. He’s a FreeBSD committer, maintainer of the pf firewall in
FreeBSD and a board member of the EuroBSDCon foundation.
Kristof has an unfortunate tendency to stumble into uClibc bugs, and a burning
hatred for FTP. Do not talk to him about IPv6 fragmentation.