[Dnsmasq-discuss] Dnsmasq on high load

Simon Kelley simon at thekelleys.org.uk
Sun Mar 15 21:06:33 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/03/15 00:15, Rick Jones wrote:
> On 03/11/2015 02:56 PM, Simon Kelley wrote:
>> On 10/03/15 13:39, Chen Wei wrote:
>>> On Tue, Mar 10, 2015 at 11:15:38AM +0200, Анатолий Мулярский 
>>> wrote:
>>>> I'm using dnsmasq as a caching DNS-server for 2000+ users. 
>>>> cache-size=9500 dns-forward-max=4000
>>>> 
>>>> Periodically I got the message: dnsmasq[2272]: failed to
>>>> send packet: Resource temporarily unavailable
>>>> 
>>>> Can someone suggest me how to optimize my configuration for
>>>> high load and get rid of the above message?
>>>> 
>>> 
>>> Sounds like the 10k problem.
>>> 
>>> My understanding is dnsmasq was designed to be small and
>>> portable. Its select() loop works very well for most of us, but
>>> has limitation when comes to high concurrency connections.
>>> FD_SETSIZE along has a upper limit of 1024 on Linux.
>> 
>> I don't think that's the problem. For UDP, you can handle as
>> many connections as you like with two (or even one) sockets. Once
>> you want random source ports for upstream connections, you need
>> more, but dnsmasq should limit the number of those sockets to
>> avoid file-descriptor problems.
> 
> Does dnsmasq make any setsockopt(SO_SNDBUF) settings?  Perhaps the 
> SO_SNDBUF has filled thanks to Linux's intra-stack flow-control and
> an attempt to (non blocking?) send has triggered the EAGAIN?
> 
> Just guessing,
> 

No, it doesn't change the buffer size. I think your guess may be a
good one.


I wonder some adaptive buffer-size expansion could be created?



Cheers,

Simon.

> rick jones
> 
> 
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlUF9FkACgkQKPyGmiibgrcNLgCdHevWIfUYOLJdmXyu9RKnMgcX
UFcAoIza1wwN8Dqp6dC6WHV/Kdbo8Cmy
=Bjz5
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list