CPU/Load issues (FreeBSD, BIND 9.4.1)

Dmitry Rybin kirgudu at corbina.net
Fri Jul 6 06:49:35 UTC 2007

Mark Andrews wrote:
>> If the answer is "Ask my OS mailing list", please tell me.  If it's
>> "buy a BIND support contract", please tell me.  If it's "screw it, the
>> latest FreeBSD, the latest BIND, and 2g of ram on a Dell 600SC is
>> inadequate to run solely a DNS server and sshd", tell me.
> 	Well FreeBSD has a 512MB per process limit built into the
> 	kernel by default.  See your OS documentation for how to
> 	change this at boot time.

It doesn't matter. I have limit in 2Gb on FreeBSD 6.2-STABLE i386.
bind-9.4.1 eat more 1gb memory (limit 1,5 gb for cache), load 100% CPU
and slow answer to queries.

Build with ISC_MEM. Bind is very _unstable_ on high loads.

As workaround for recursive you may use djbdns, powerdns-recursor. Or
use script like this:
# IF MEMORY LIMIT ACCURED, then restarting named

MEMLIM="1100000"                # Set your Memory limit
MEM=`ps axu|grep "^bind"|awk '{print $6}'`      # Cur mem
PFILE="/var/run/named.pid"      # Named PID file

if [ $MEM -gt $MEMLIM ];then
         logger -t named_restart "OVER MEM LIMIT MEM: $MEM \> MEMLIM:
         /etc/rc.d/named stop
         sleep 10

         if [ -e $PFILE ];then
                 echo "Killing named";
                 kill -9 `cat $PFILE`
                 kill -9 `pgrep named`
                 sleep 1

         /etc/rc.d/named start && echo "Named Started"

>> Thanks for any and all help,
>> Dan Mahoney
>> Frustrated in Long Island

More information about the bind-users mailing list