Avoiding natd overhead

Fabian Keil freebsd-listen at fabiankeil.de
Sat Oct 21 14:10:40 UTC 2006


Chris Bowman <chrishome at austin.rr.com> wrote:

>   I see this question come up now and then on the lists, so, I'll share 
> what I've learned about natd and performance!  First, if your running 
> natd on a processor which supports more functions than just a standard 
> 386,  ie a Pentium, Athlon, etc.  Then I've found compiling natd with 
> make flags for that processor, and with O3 optimizations will make your 
> jaw drop in comparison to the default installed version of natd.

I've learned that if you care about NAT overhead you just don't use natd.

I run two jailed Tor nodes on a Intel Celeron 2.40GHz. With PF disabled
and NAT done with natd, natd uses something between 20 and 30% of the
cpu time.

With PF (filtering, NAT, queueing) enabled I don't see a measurable
increase of cpu usage at all.

I haven't tried recompiling natd with customized flags,
but I doubt that it helps enough to overlook the context
switch penalty.

Fabian
-- 
http://www.fabiankeil.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20061021/6862c0ad/signature.pgp


More information about the freebsd-net mailing list