On 7/6/06, <b class="gmail_sendername">bert hubert</b> <<a href="mailto:bert.hubert@netherlabs.nl">bert.hubert@netherlabs.nl</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, Jul 06, 2006 at 11:03:14AM -0700, Mark Moseley wrote:<br>> Just a quick question regarding the excellent pdns-recursor:<br><br>Thanks :-)<br><br>> To save myself a number of days of trial and error, I'm curious if there's a
<br>> rough conversion for max-cache-entries => memory limit of cache. Obviously<br>> it's not going to be exact but is there a maximum limit in bytes of each<br>> cache entry, so that max-cache-entry x max-cache-entries = Max memory used
<br>> for cache?<br><br>No, there is no hard and fast rule. *Actual* memory use depends on a lot of<br>things, including c++ compiler, operating system paging strategy, access<br>patterns.<br><br>From what I know, 4 million cache entries correspond to around 1G of memory
<br>used. From my measurements, there is not a lot of benefit of using more than<br>4 or 5 million entries, generally.<br><br>On 64 bit systems, some more memory will be needed because of the 8 byte<br>pointers. This has been confirmed by some large operators.
<br><br>Tinydns is able to do exact bytewise limiting of memory usage, which is very<br>impressive. I've pondered doing something like it but it requires a lot of<br>very tricky coding, so the current cache entries limit will have to do.
<br><br>Good luck!<br><br>--<br><a href="http://www.PowerDNS.com">http://www.PowerDNS.com</a>      Open source, database driven DNS Software<br><a href="http://netherlabs.nl">http://netherlabs.nl</a>              Open and Closed source services
<br></blockquote></div><br><br>Cool, that gives me round numbers to work with. Thanks for the info!<br>