9.2.5 db causes high cpu? was: Re: BIND 9.2.5rc1 is now available.

Stefan Schmidt zaphodb--bind at zaphods.net
Sun Feb 20 01:14:31 UTC 2005

On Sun, Feb 20, 2005 at 08:58:24AM +0900, JINMEI Tatuya / ?$B?@L at C#:H wrote:
> >> 1808.	[bug]		zone.c:notify_zone() contained a race condition,
> This bug only matters for authoritative servers, so it should most
> likely be irrelevant to your problem.
Ack, i simply overlooked the notify_zone() part. *blush*

> > I only switched bind versions; kernel version, uptime, swapping behaviour
> > was/has not changed in any way.
> > The image shows cpu usage change when i switched the machine from _two_!
> > bind 8.4.6-REL processes to _one_ bind 9.2.5beta2-threaded.
> > The machine is running Linux 2.6.11-rc2 debian/unstable with libc6-i686 on a
> > Compaq Proliant DL360 G1 (i.e. 2xPIII 800MHz 1GB RAM).
> I'd first like to recommend disabling threads.  From my experiences,
> enable-threads buys almost nothing for most OSes, unfortunately.  If
> you can allow the configuration with 2 named processes, it should
> provide better performance than a single BIND9 process with 2 threads.

This i can do - adapting the bind8 config files should do the trick, but i
will have to impose max memory for the two processes to roughly 450MB via
How about using NPTL with bind9 btw.?

> Secondly, according to your memory usage and configuration (i.e.,
> max-cache-size=700M, 623m used), it looks like named reaches the
> high-water mark for the specified maximum, and tries to purge some
> cache entries.  If this periodically happens, it may be the reason for
> the high CPU usage.  So, if possible, it might help if you can add
> more memory which can afford the typical use case under the high-water
> level.

I.e. throwing hardware at a problem - this is not the kind of solution i like
best. Why is bind9 using twice the memory bind8 does - are there serious
changes to the way the RRs are cached or is it that bind9 needs to keep the
data twice for some internal reason like views?
I will have a look at how bind9.2 behaves if i set max-cache-size to 900M. I
suspected the cache purges anyways.

> > top states. I have set max-cache-size 700M; there but previous bind9
> > experiments show that it does not really care about when it breaches this
> > limit. On Linux that is capability module loaded. Sorry ISC.
> One possible reason for this is that max-cache-size did not work for
> ADB, another memory-conscious database for caching servers, in 9.2.x.
> I believe 9.3.x has a fix to this.

I will first try bind9.2 non-threaded with max-cache-size lesser than the
ulimit and then have a look at how bind9.3 behaves on this.

"Anyone who is capable of getting themselves made President should on no
account be allowed to do the job"

More information about the bind-workers mailing list