[nsd-users] Problems loading zone with nsd4

Devin Reade gdr at gno.org
Wed Jun 25 21:59:49 UTC 2014

Quoting Klaus Darilion <klaus.mailinglists at pernau.at>:

> Hi!
> I just tried to switch from nsd3 to nsd4 but nsd4 fails to load the
> zone. The zone is approx 170MB (Bind text format).

> 10:17:59 nsd[4059]: mremap(/var/lib/nsd/nsd.db, size 1743910912) error
> Cannot allocate memory
> The server has 8GB RAM, 512KB swap and 9GB of free disk space, and there
> is plenty of disk and ram left when nsd logs the memory error.

How confident are you on the "there is plenty of disk and ram left"
statement?  In particular, you've got 8GB of memory available,
virtually no swap, and you're trying mmap a file that is 1.7GB.
I don't know how many processes are trying to mmap that file, but
you've not got a lot of head room there.

With respect to the other server working with fewer resources, do you
by chance have overcommit disabled on the broken box and enabled on the
working box?

Also, compare the sizes of /var/lib/nsd/nsd.db on the two machines.
Perhaps the working box is able to mmap because the db file is smaller on
that one.

Is allocating more swap on the broken box an option?  Other than using
up disk space, having lots of swap isn't a downside as long as your
paging rate is low.  That is probably true even if your swap is on
SSD/flash; with a low paging rate, you shouldn't run into flash wear
issues due to using swap.  Maybe add a swap file to test?


More information about the nsd-users mailing list