[Dnsmasq-discuss] [PATCH] Remove upper limit of 10, 000 for cache size

Simon Kelley simon at thekelleys.org.uk
Tue May 8 21:17:24 BST 2018


The reason for the limit is actually performance: there may be plenty of
RAM, but the larger the cache is, the slower it is. This is true for
reverse (PTR) queries, which are less optimised than normal forward queries.

I accept that the limit may now be too small, but it would be worth
doing some measurements of cache performance before raising or removing it.


Cheers,

Simon.

> From: Dominik Derigs <dl6er at dl6er.de>
> Date: Tue, 8 May 2018 18:44:41 +0200
> Subject: [PATCH] Remove upper limit of 10,000 for cache size. We should
> allow
>  users to set any (maximum) cache size they like to set. Even embedded
> devices
>  usually ship with at least 1 GB of RAM nowadays so memory shouldn't be an
>  issue. Furthermore, this clipping is also not documented in the man page.
> To: dnsmasq-discuss at lists.thekelleys.org.uk
> 
> Signed-off-by: Dominik Derigs <dl6er at dl6er.de>
> ---
>  src/option.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/option.c b/src/option.c
> index 65df93a..180517a 100644
> --- a/src/option.c
> +++ b/src/option.c
> @@ -2589,8 +2589,6 @@ static int one_opt(int option, char *arg, char
> *errstr, char *gen_err, int comma
>            
>             if (size < 0)
>               size = 0;
> -           else if (size > 10000)
> -             size = 10000;
>            
>             daemon->cachesize = size;
>           }
> 



More information about the Dnsmasq-discuss mailing list