Hey Simon,

removing the upper limit will not change anything except for the few
users that have set this value manually to a very large number. However,
if they did so they were surely not expecting that dnsmasq could just
ignore their setting.

Personal experience with dnsmasq as a caching DNS server for a few
hundred fairly active clients shows no notable performance impact even
when allowing the maximum cache size to be > 100,000 (query reply time
from cache is on the order of < 5 msec). It may always be that I miss
something but even when dnsmasq's cache would be 10 (or more) times
slower, it would still be much faster than when we'd periodically ask
upstream servers.

Best,
Dominik


On 08.05.2018 22:17, Simon Kelley wrote:
> 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 <dl...@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@lists.thekelleys.org.uk
>>
>> Signed-off-by: Dominik Derigs <dl...@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;
>>           }
>>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to