[Pdns-users] max-cache-entries

bert hubert bert.hubert at netherlabs.nl
Thu Jul 6 18:17:58 UTC 2006

On Thu, Jul 06, 2006 at 11:03:14AM -0700, Mark Moseley wrote:
> Just a quick question regarding the excellent pdns-recursor:

Thanks :-)

> To save myself a number of days of trial and error, I'm curious if there's a
> rough conversion for max-cache-entries => memory limit of cache. Obviously
> it's not going to be exact but is there a maximum limit in bytes of each
> cache entry, so that max-cache-entry x max-cache-entries = Max memory used
> for cache?

No, there is no hard and fast rule. *Actual* memory use depends on a lot of
things, including c++ compiler, operating system paging strategy, access

>From what I know, 4 million cache entries correspond to around 1G of memory
used. From my measurements, there is not a lot of benefit of using more than
4 or 5 million entries, generally.

On 64 bit systems, some more memory will be needed because of the 8 byte
pointers. This has been confirmed by some large operators.

Tinydns is able to do exact bytewise limiting of memory usage, which is very
impressive. I've pondered doing something like it but it requires a lot of
very tricky coding, so the current cache entries limit will have to do.

Good luck!

http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

More information about the Pdns-users mailing list