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.
NSD Memory Usage on Debian Wheezy
Anyone running NSD on Debian Wheezy? Memory usage has gone beserk.
These are both OpenVz / vSwap VMs:
Debian Squeeze production ns1: nsd v. 3.2.12. 131 zones, 1,178 records, ~600,000 queries/month:
[root@ns1:~] ps aux | grep nsd nsd 5501 0.0 1.3 11276 1732 ? S Aug19 0:17 /usr/sbin/nsd -c /etc/nsd3/nsd.conf nsd 23494 0.0 0.6 4208 812 ? S Aug20 0:00 /usr/sbin/nsd -c /etc/nsd3/nsd.conf nsd 23496 0.0 0.7 4620 940 ? S Aug20 0:02 /usr/sbin/nsd -c /etc/nsd3/nsd.conf
Debian Wheezy testbox: nsd v. 3.2.12. 0 zones, 0 records, 0 queries:
[root@testbox:~] ps aux | grep nsd nsd 3864 0.0 36.4 51600 47768 ? Ss 10:00 0:00 /usr/sbin/nsd -c /etc/nsd3/nsd.conf nsd 3872 0.0 18.4 58260 24176 ? S 10:00 0:00 /usr/sbin/nsd -c /etc/nsd3/nsd.conf nsd 3873 0.0 18.2 51600 23952 ? S 10:00 0:00 /usr/sbin/nsd -c /etc/nsd3/nsd.conf
Comments
Yes I am seeing the same. But I did not run it before Wheezy, so can't compare. I agree that it uses way too much RAM for what it does (only about 8-10 zones on mine).
@rm_, thanks for confirming. Looks like it's caused by the package build environment.
I built nsd v. 3.2.16 from source on my Wheezy testbox, matching the configuration of the packaged version [1], and copied the 7 nsd binaries [2] to /usr/sbin, then started nsd:
Someone needs to build a sensible nsd package for Wheezy
[1] Source build configuration:
[2] Actually 6 binaries and one bash script. nsdc.sh from the source build becomes /usr/sbin/nsdc (no .sh extension).
If you care enough, write a bug-report to http://bugs.debian.org/nsd3
It would also help if you could figure out what exactly is wrong with the "stock" build process, prior to that.
I could, but I get the impression that there's not much activity these days with the NSD debian packaging.
How we have v. 3.2.12 in Wheezy, a release from a year ago that existed for only eight days, is a mystery to me....
@sleddog, @rm_
This is because of the default settings for the response rate limiting. There is no need for package rebuild. It is only matter of configuration. See https://blog.srvbox.com/nsd3-eating-up-memory-after-update-to-wheezy-version-3-2-12-3/ for details.
Here is some more info: https://www.nlnetlabs.nl/blog/2012/10/11/nsd-ratelimit/
I set rrl-size: 1 (it won't accept 0),
rrl-ratelimit: 0
rrl-whitelist-ratelimit: 0
And that drops memory usage by about 25MB.
Sleddog did not compile with –enable-ratelimit, which should give about the same result.
Keeping rate limiting on, but setting rrl-size: 100000 (one tenth of the default) drops about 20MB of memory.
I see it now. The 3.2.12-3 in Wheezy has rate-limiting compiled in, while the 3.2.12-1 in backports (which I installed on Squeeze) does not. From the Debian NSD changelog: