?
Solved

Bind Memory usage

Posted on 2012-03-12
15
Medium Priority
?
343 Views
Last Modified: 2012-04-13
I have just upgraded from Bind 9.7 to Bind 9.8.1 Patch 1  and I'm noticing that the occupied physical memory is increasing to values larger than usual. Whilst in the former release the occupied physical memory stabilises at a value of approximately 4GB, I am now noticing that the occupied memory is using all the 16GB available to the server.

Was there any major change or could this be a memory leak in the named daemon process? I am using a Solaris 10 Operating System running on Oracle Hardware with Sparc Architecture.
0
Comment
Question by:Duncan_Cauchi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
15 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 37712121
What are you serving? Mine uses like 100MB proxying whole net and active directory for 1000 users or so.
0
 

Author Comment

by:Duncan_Cauchi
ID: 37713341
Hi gheist

I'm severing around 60k users this is the dns server of an isp. This was working fine with the previous bind 9.7. Last week I've even replaced reinstalled the same bind on another spark server to eliminate the possibility of hardware failure but when I've put it in the live environment it did the same.

Cheers
Duncan
0
 
LVL 62

Expert Comment

by:gheist
ID: 37713463
max-cache-size parameter specifies how much of records are cached.
practical description here:
https://groups.google.com/group/comp.protocols.dns.bind/browse_thread/thread/3865f4eccd37097e

i get a feeling that default 32mb cache is not enough for you and your server lags because it makes parallel queries for all clients all the time requesting and that takes a lot of RAM for network buffers.

PS MaraDNS is significantly more compact.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Duncan_Cauchi
ID: 37714452
The default settings specifies that there is no limit for the cache size, thus occupying all the memory. However in previous Bind releases, this occupied memory did not exceed 4GB, whilst with the new release we are using all of the 16GB available to the system.

Is this expected behavior?
0
 
LVL 62

Expert Comment

by:gheist
ID: 37715354
"occupying all memory" means using swap.....
maybe limit it in some way like half of RAM.

Is it DNS cache or authority or both?

Maradns is really smaller and faster.
0
 

Author Comment

by:Duncan_Cauchi
ID: 37719349
not using Swap. Physical memory

We are using both an authoritative and recursive server.

we will limit it ourselves.
0
 
LVL 62

Expert Comment

by:gheist
ID: 37719444
old bind was 32bit and thus limited to 4gb
new looks 64bit one and using even more.

having cache limited as such may save you from pollutiong cache by people tunneling connections via DNS and others rolling names quickly.
0
 

Author Comment

by:Duncan_Cauchi
ID: 37723753
yes it seems so.

Is there a command that I can check if it is 32bit or 64bit?

Thanks
0
 
LVL 62

Expert Comment

by:gheist
ID: 37724255
file `which named`
0
 

Author Comment

by:Duncan_Cauchi
ID: 37741989
Hi Gheist,

I think that the X64 bit is the issue.

Still the above command didn't return anything.

is there any other command which i can see if the bind is x64bit?

Cheer
Duncan
0
 
LVL 62

Expert Comment

by:gheist
ID: 37745324
$ file `which nslookup`
/usr/bin/nslookup: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped

(this consumes file named /etc/magic to identify files)

$ ldd `which nslookup`
        blah blah
        libc.so.6 => /lib64/libc.so.6 (0x0)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0)
        blah blah blah

(ld.so resolver)
0
 

Author Comment

by:Duncan_Cauchi
ID: 37753361
Hi gheist

the command worked ... but it showed that the bind is 32bit  :(


Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
# file `which named`
/usr/sbin/named:        ELF 32-bit MSB executable SPARC Version 1, dynamically l                                                 inked, stripped
#
0
 
LVL 62

Expert Comment

by:gheist
ID: 37754586
Is system using RAM as a disk cache? Or you see 16GB used by a single process???

Try this http://www.maradns.org/tutorial/bind2csv2.html
It really saves memory compared to BIND and AD which were in place before.

Splitting recursive and authoritative is a better architecture for BIND itself. Other DNS servers do not have same problem.
0
 

Author Comment

by:Duncan_Cauchi
ID: 37823456
System is using the RAM and there is no particular process using all the memory

below find the output from the "top" command.

last pid: 29251;  load avg:  4.02,  4.05,  4.04;       up 33+20:43:46  16:14:44
39 processes: 37 sleeping, 2 on cpu
CPU states: 88.1% idle,  7.9% user,  4.1% kernel,  0.0% iowait,  0.0% swap
Memory: 16G phys mem, 1170M free mem, 2048M total swap, 2048M free swap

   PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
 10212 named     35  53    0 1447M 1411M cpu/35 2020.3 10.80% named
 10366 root       1  59    0   11M 8320K sleep   20.8H  0.15% snmpd
 29250 root       1  59    0 3712K 2728K cpu/39   0:00  0.01% top
  6949 noaccess  18  59    0  175M   96M sleep   75:02  0.00% java
  6605 root       3  59    0 6136K 2840K sleep    0:12  0.00% automountd
 29235 dcauchi    1  59    0 7752K 6424K sleep    0:00  0.00% sshd
    10 root      12  59    0   16M   11M sleep    0:57  0.00% svc.startd
 24189 root      26  59    0   10M 8056K sleep    2:42  0.00% nscd
  6770 root       1  59    0 9776K 3320K sleep    1:52  0.00% sendmail
    12 root      15  59    0   11M 8640K sleep    3:17  0.00% svc.configd
  6954 root       4  59    0   12M 5648K sleep    0:49  0.00% inetd
    86 root       7  59    0 4328K 1736K sleep    1:02  0.00% devfsadm
  6673 root       1  59    0 1760K  864K sleep    0:07  0.00% utmpd
   709 root       9  59    0 6336K 5040K sleep   11:26  0.00% picld
  6617 root      27  59    0   20M   10M sleep    1:23  0.00% fmd
0
 
LVL 62

Accepted Solution

by:
gheist earned 1500 total points
ID: 37828535
The feature is called "unified buffer cache" or so - namely using all of (unused) memory as (read) cache of the disk.
Nothing to worry about, system will discard less used data as programs need memory.

I see you are monitoring your system using SNMP, if it has some (CPU&network packets/s) trends analysis you are more or less covered for future. Memory usage of bind will not exceed 4GB, it stores DNS records in more compact format than config files in those 1.5GB of RAM.

So far I see no anomaly, you might also consider running process accounting to identify trends in bind's resource usage.

Also when reading network stats you need to know packet rate because gigabit wthernet will be limited at 90k packets/s in and same out. That applies to short DNS requests (say 50 bytes) which may be accounted wrongly thus giving no indication that your GigE network card is actually maxed out at mere 5MB/s
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question