Re: [Dnsmasq-discuss] Very slow load time on systems with a large `ulimit -n`

2020-03-03 Thread Arthur Darcet
On Mon, 2 Mar 2020 at 19:38, Simon Kelley  wrote:

> Thanks for the heads-up.
>
>
> http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0541a1adf7c25356e7bbd792a8d6ee217a0d92f3
>
> followed by
>
>
> http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=48755ebf093543113de96747a7f5f78e0640b333
>
> fixes this, at least on Linux.
>

Great, thank you for the quick patch!

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


Re: [Dnsmasq-discuss] Very slow load time on systems with a large `ulimit -n`

2020-03-02 Thread Simon Kelley
On 02/03/2020 08:32, Arthur Darcet wrote:
> Hello,
> 
> As discussed here: https://github.com/pi-hole/FTL/issues/703
> 
> At startup, dnsmasq tries to close all file descriptors from 0 to
> `ulimit -n` (the maximum number of open files) - here
> http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/dnsmasq.c;h=573aac069b75b801ad1ddf5305af5010ca1ab88a;hb=HEAD#l151
> 
> On setups where this limit is high, this takes a large amount of time -
> or even "hangs" indefinitely. Docker sets this limit to ~1M for instance
> - and the kubernetes setup I am using (k3s) is setting it to "Infinity",
> which translates to 1073741816.
> 
> I would suggest switching over to something based on the actually open
> files - like was done for the rpm package: cf
> https://bugzilla.redhat.com/show_bug.cgi?id=1537564 and
> https://github.com/rpm-software-management/rpm/pull/444/files for an
> actual patch
> 
> Work around is to run a `ulimit -n 1024` before starting dnsmasq - but
> that's not really a clean solution.
> 
> Thanks!
> Arthur
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


Thanks for the heads-up.


http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0541a1adf7c25356e7bbd792a8d6ee217a0d92f3

followed by

http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=48755ebf093543113de96747a7f5f78e0640b333

fixes this, at least on Linux.

Simon.

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


[Dnsmasq-discuss] Very slow load time on systems with a large `ulimit -n`

2020-03-02 Thread Arthur Darcet
Hello,

As discussed here: https://github.com/pi-hole/FTL/issues/703

At startup, dnsmasq tries to close all file descriptors from 0 to `ulimit
-n` (the maximum number of open files) - here
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/dnsmasq.c;h=573aac069b75b801ad1ddf5305af5010ca1ab88a;hb=HEAD#l151

On setups where this limit is high, this takes a large amount of time - or
even "hangs" indefinitely. Docker sets this limit to ~1M for instance - and
the kubernetes setup I am using (k3s) is setting it to "Infinity", which
translates to 1073741816.

I would suggest switching over to something based on the actually open
files - like was done for the rpm package: cf
https://bugzilla.redhat.com/show_bug.cgi?id=1537564 and
https://github.com/rpm-software-management/rpm/pull/444/files for an actual
patch

Work around is to run a `ulimit -n 1024` before starting dnsmasq - but
that's not really a clean solution.

Thanks!
Arthur
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss