Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2013 17:42:59 +0800
From:      Kevin Lo <kevlo@kevlo.org>
To:        "Eggert, Lars" <lars@netapp.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, "mjl@luckie.org.nz" <mjl@luckie.org.nz>
Subject:   Re: high cpu usage on natd / dhcpd
Message-ID:  <510A3CA3.2010803@kevlo.org>
In-Reply-To: <D4D47BCFFE5A004F95D707546AC0D7E91F6B79D2@SACEXCMBX01-PRD.hq.netapp.com>
References:  <D4D47BCFFE5A004F95D707546AC0D7E91F6B79D2@SACEXCMBX01-PRD.hq.netapp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?510A3CA3.2010803>