[Pdns-users] Recursor Cache Sizing: Is more always better?

Otto Moerbeek otto at drijf.net
Sat Sep 9 08:13:18 UTC 2023


On Sat, Sep 09, 2023 at 09:59:19AM +0200, Winfried via Pdns-users wrote:

> Hi Christoph,
> 
> My recommendation is to limit the TTL to 12 or 6 hours and find out how many cache entries are created during this time. Increase that by 50% and that's your value. You'll see that it doesn't require that much memory space.
> 
> Winfried 
> 
> Am 9. September 2023 09:15:04 MESZ schrieb Christoph via Pdns-users <pdns-users at mailman.powerdns.com>:
> >Hi,
> >
> >if you have 20 or 100 GB of free RAM
> >what is a good approach to choose the different Recursor's cache sizes?
> >
> >Is larger always better or is there a sweet spot
> >between cache size, cache lookup time, cache management overhead and CPU usage? How does upstream latency fit into the equation?
> >
> >In our case we consider caching and prefetching also an important privacy property to decouple inbound and outbound queries to some extend.
> >
> >We have different kinds of setups:
> >- fully recursive resolvers
> >- forwarding resolvers (~12ms upstream latency)
> >
> >best regards,
> >Christoph
> >_______________________________________________

Agrreed, I think that general rules are hard to give for cache sizing,
as each site and its users are different. Do remember that the packet
cache was changed in 4.9.0, it is now shared between threads. This means
that its performance and behaviour wrt hit ratio etc did change as
well. The difference (for the better!) will be mostly noticable when
pdns-distributes-queries=no

	-Otto


More information about the Pdns-users mailing list