New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Bind Memory Usage
Hi,
I'm having some issues with bind memory usage.
This is memory stats before starting bind:
[root@us ~]# free -m total used free shared buffers cached Mem: 256 25 230 0 0 0 -/+ buffers/cache: 25 230 Swap: 0 0 0
This is after starting the bind:
[root@us ~]# free -m total used free shared buffers cached Mem: 256 58 197 0 0 0 -/+ buffers/cache: 58 197 Swap: 0 0 0 [root@us ~]#
33 MB difference in memory. The top command shows bind is using 3716 = 3.63 MB only. My question is where other 30 MB memory gone.
[root@us ~]# top -b -n1 top - 15:53:33 up 10:59, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 15 total, 1 running, 14 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2%us, 0.1%sy, 0.0%ni, 99.6%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 262144k total, 60412k used, 201732k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 15 0 10364 732 620 S 0.0 0.3 0:00.46 init 1983 root 18 0 20892 1188 596 S 0.0 0.5 0:00.00 crond 2024 root 18 0 46756 816 428 S 0.0 0.3 0:00.00 saslauthd 2025 root 18 0 46756 548 160 S 0.0 0.2 0:00.00 saslauthd 4019 root 18 0 86080 3356 2608 S 0.0 1.3 0:00.58 sshd 4021 root 15 0 12076 1680 1316 S 0.0 0.6 0:00.11 bash 5267 root 15 -4 12792 760 440 S 0.0 0.3 0:00.00 udevd 5376 root 15 0 6816 612 496 S 0.0 0.2 0:00.00 syslogd 5535 root 18 0 63544 1168 608 S 0.0 0.4 0:00.00 sshd 5571 root 17 0 21660 924 712 S 0.0 0.4 0:00.00 xinetd 23621 root 18 0 14964 856 512 S 0.0 0.3 0:00.00 proftpd 23825 root 18 0 202m 6564 3264 S 0.0 2.5 0:00.00 httpd 23826 apache 23 0 202m 3952 628 S 0.0 1.5 0:00.00 httpd 24241 named 25 0 88456 3716 1816 S 0.0 1.4 0:00.00 named 24250 root 15 0 12620 1072 840 R 0.0 0.4 0:00.00 top
after stopping the bind memory returns to 25 MB.
any help would be highly appreciated.
Comments
I have just checked this on another vps and its the same... 35 MB memory used before and 75 MB memory used after starting Bind. Top command is showing 3.38MB used by bind. Above VPS does not have any zones loaded however this one has 5 zones.
I wonder if someone can explain this?
I wonder if it's loading a huge zone file for some reason. How many zones are we looking at?
edit: Some discussion here: http://serverfault.com/questions/113166/any-way-to-reduce-bind9-memory-footprint
Nothing much really but just a confirmation that the chunk of memory used is normal it appears.
No zones for first VPS I was just setting it up and only 5 zones for 2nd VPS.... even if its loading huge zone file the memory should be reflected in Top command is not it?
I'm worried why the memory is not justified.
This is rndc status for first vps:
It takes that much and more, and that increases if you load more zones. But there are alternatives to BIND that take much less memory.
MaraDNS for example.
BIND allocates much more memory than it really needs. Older OpenVZ memory limits are based on allocation, not the real usage.
OpenVZ.. yeah ¬¬ You must be grateful, because in some processes, the memory used is almost the VIRT column in your top (88 mb in your case)
I've installed NSD took only 10MB memory.
NSD is neat