dnsperf and BIND memory consumption

Danny Mayer mayer at ntp.isc.org
Thu Aug 7 04:42:16 UTC 2008


Vinny Abello wrote:
> Hi everyone,
> 
> I noticed some odd behavior with BIND 9.5.0-P2 in regards to memory utilization when being tested using dnsperf. The memory usage just continually climbs and never levels out. I've done this with both queries that require recursion as well as queries with authoritative results. In fact, I can just have a single query for localhost in my dnsperf sample and loop that and I'll still see the memory consumption climb for as long as I leave dnsperf running. I have it up over 3GB now before I stopped:
> 
>   PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
> 52595 bind       11  44    0  3228M   933M select 1   0:35  0.00% named
> 
> I was able to trigger the same thing against BIND 9.4.2 running on
Windows. The memory usage just keeps climbing. Can someone explain why
this happens, and secondly how to prevent it from happening? Any user
with dnsperf could easily exhaust the memory on a server running BIND
from what I'm looking at.

There was a socket memory leak in the Windows code which has just been 
fixed.
  This just seems too easy to trigger and too
big of an oversight for this to be true.

No, it's not easy to find or reproduce.

  I'm hoping I'm just mistaken
and am not really understanding what's going on here. If there is a way
to prevent this with some options for limiting memory, shouldn't there
be sensible defaults in place if none are specified? I know I've caused
Windows to massively slow down and start swapping by doing this. And
what is the point of using all of that memory anyway? If I just keep
doing a query for localhost which is an authoritative answer, what
information could named possibly be continuously using memory for?

You can get a lot of that sort of information if you look at the 9.5.x 
statistics when you enable the httpd interface.

Danny

> 
> I'm curious what will happen if I just leave dnsperf running
> unchecked
and watch the server. The one I'm testing is not in production so it
doesn't matter. I'm just curious.
> 
> 
> Also, one side note: I noticed that my test data with recursive data
yields about 15k queries per second on this machine whereas my
authoritative localhost queries only clock in around 4k on the same box
and version of BIND. Why is that?
> 
> I should mention that the memory never gets out of control under
normal usage as a caching name server doing several hundred recursive
queries per second. I've only noticed it with dnsperf... unless it is
just accelerating a problem that is there under normal load as well.
> 
> Thanks for any pointers... >
> -Vinny
> 
> 
> 



More information about the bind-users mailing list