BIND 9.3.2 on FreeBSD 6.1 out of control

JINMEI Tatuya / 神明達哉 jinmei at isl.rdc.toshiba.co.jp
Tue Jan 16 02:56:11 UTC 2007


>>>>> On Mon, 15 Jan 2007 16:17:27 -0600, 
>>>>> "Matthew Schlosser" <mschlosser at eschelon.com> said:

>> I've often heard this type of symptom, especially on FreeBSD.  One
>> common cause is that BIND9's cache cleaning (prior to 9.4) relies on
>> system's malloc()/free() routines, which could run inefficiently on
>> FreeBSD (I'm not really sure if it's still the case for 6.1, but it
>> was at least for some 4.X versions); and one common workaround is to
>> enable BIND9's internal memory allocator by rebuilding BIND9 with:
>> 
>> % ./configure STD_CDEFINES='-DISC_MEM_USE_INTERNAL_MALLOC=1'
>> 
>> This should be very effectively particularly for the case of cache
>> cleaning because it will most likely recycle pre-allocated memory
>> fragments without involving any system calls or possible-inefficient
>> standard libraries.

> Could this affect the problem I'm having (see message "Bind9 Crazy-high CPU
> on Linux")?  The symptoms are similar, but not the same.

Perhaps, but it also depends on details of the problem and of your
environment, especially the memory usage when the problem occurs and
whether you specify max-cache-size (and if yes the value of the
option).

It should also be noted that even if the use of the internal allocator
mitigates the problem it doesn't change the fact that cache cleaning
is a heavy task.  So, while cleaning the cache, the CPU will still be
pretty busy (the busy period will probably be shortened), and some
incoming queries may still be dropped during the period.  BIND 9.4
remedies the query drop issue further, by adjusting non-interruptible
cleaning periods (during which queries aren't processed) based on
average query rate.

In summary,

- the internal allocator on 9.3 may help, but the CPU will still be
  busy (though the busy period may be shorter) and queries may still
  be dropped during the busy period.
- 9.4 may also help, and hopefully there will be no query drops;
  however, the CPU will still be busy for some shorter period.

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					jinmei at isl.rdc.toshiba.co.jp



More information about the bind-users mailing list