Bug 841 - big local-zone's make it consume large amounts of memory
big local-zone's make it consume large amounts of memory
Product: unbound
Classification: Unclassified
Component: server
x86_64 Linux
: P5 minor
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2016-09-29 14:47 CEST by Robert Edmonds
Modified: 2019-04-18 16:13 CEST (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Robert Edmonds 2016-09-29 14:47:21 CEST

The discussion in https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=839 reminded me that I've forgotten to forward this bug report from the Debian BTS:


This bug is slightly different from #839 in that actual RR's are being created (and I think they are all in the same local-zone), so I'm not sure if the deferred allocation fix in #839 would be effective for this related issue.
Comment 1 Wouter Wijngaards 2016-09-29 15:13:07 CEST
Hi Robert,

It fails because it creates one RRset with 60.000 elements.  And it reallocates arrays for the rrset for every RR.

The solution is to cap the number of RRs in an RRset to a sensible maximum.  With 16 bytes for an A record and 64K, 4096 seems a safe maximum.

Most RRsets are very much smaller so I see no real need to do anything about remaining couple Mb memory usage.

Best regards, Wouter
Comment 2 RichardKnox 2019-04-18 16:13:21 CEST
The circumstance is progressively entangled on nonuniform memory get to systems. When in doubt, the allocator endeavors to find memory local to the processor playing out the distribution, despite the fact that there are ways. http://www.essayempire.co.uk