[Dnsmasq-discuss] Dnsmasq on high load

Rick Jones rick.jones2 at hp.com
Thu Mar 12 00:15:41 GMT 2015


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,

rick jones




More information about the Dnsmasq-discuss mailing list