Performance improvement for NAT in IPFIREWALL
silby at silby.com
Wed Jul 2 14:40:01 PDT 2003
On Wed, 2 Jul 2003, Michael Sierchio wrote:
> Currently, performance w/divert sockets and natd in ipfirewall
> on a compute-bound platform (ELAN-133MHz) shows ipfw+natd throughput
> to be 50% of that offered by ipfilter+ipnat.
> Is there anything that can be done to speed up either the
> performance of divert and natd? Alternatively, could network
> address translation be merged into ipfirewall?
> As we move from 1000BASE-TX to 10000BASE-TX, this will become
> more of an issue, even on 3GHz machines.
> Comments? Suggestions? Vision?
If you have some time to throw at the problem, you might consider using
gprof on natd in order to determine what exactly about natd is slow. As
is commonly mentioned, the kernel <-> userspace switch is probably one
reason for natd's relative slowness, but I would bet that a decent speedup
could be achieved just by optimizing natd. Heck, it might be as simple as
increasing the size of some hash tables or buffers.
Tell us how it goes. :)
Mike "Silby" Silbersack
More information about the freebsd-net