high cpu usage on natd / dhcpd

Kevin Lo kevlo at kevlo.org
Thu Jan 31 09:43:37 UTC 2013


On 2013/01/31 16:45, Eggert, Lars wrote:
> Hi,
>
>> I have a small system running FreeBSD 8.2 that does NAT using ipfw and
>> natd to systems attached to two interfaces: em0 and wlan0.  I have a
>> dhcpd daemon issuing leases on those interfaces.  The system has an em1
>> interface plugged into a cable modem where it obtains a DHCP lease from
>> an ISP.
>>
>> For some reason, when traffic from the Internet terminates on the system
>> itself (I scp a file from the computer) the natd and dhcpd processes
>> consume significant CPU, and the throughput is less than I expect.
>> Traffic that passes through to a computer behind the NAT flows without
>> causing the natd or dhcpd processes to measurably consume CPU.
> I see exactly the same issue on -STABLE. Have you been able to figure out the cause?

Use ipfw nat instead. It uses the libalias(3) in kernel and avoids
gigantic natd(8) overhead.

>
> Thanks,
> Lars
>

     Kevin


More information about the freebsd-net mailing list