[Dnsmasq-discuss] dnsmasq running on RaspberryPi/ArchLinux slow to relay non-cached queries

guns self at sungpae.com
Sat Aug 16 19:30:46 BST 2014


On Fri 15 Aug 2014 at 06:17:37PM +0800, Peter Bell wrote:

> I have dnsmasq running on a RaspberryPi using the Arch Linux ARM
> distribution, implementing both dhcp and dns functionality (tftp is
> handled by a different server).
>
> I have been experiencing extremely slow browsing performance - as
> an example, a 'first' google search takes, typically, 20 seconds to
> display the results page - the slowest I've recorded has been 30
> seconds. Subsequent google searches complete within 2 seconds.

Firefox (and Chromium IIRC) will break down individual HTTP request
timings into sections, the first of which is DNS resolution. You can
use this to at least confirm that DNS is really the issue while web
browsing.

    https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor
    https://mdn.mozillademos.org/files/7417/nm-timings.png

> I have been complaining to my ISP for almost two months, blaming them
> for poor network performance, but they always reply that there are
> no issues on their network apart from some possible local contention
> issues. However, even in the middle of the night, when speedtest is
> reporting 25Mbps down/15Mbps up, a google search can still take 20
> seconds or more.
>
> The odd thing is that on a few occasions the network performance is
> perfect, when google results are always returned within 2 seconds -
> this happened last Tuesday, between the hours of 3am and 6pm.
>
> Now I think that it might be 'egg-on-face' time because I'm beginning
> to think that my performance issues are being caused by my use of
> dnsmasq as my local dns server/relay.
>
> My reasons for coming to this conclusion are based on some
> experimentation with dig.
>
> If I dig an address directly at my ISP's dns server, it will,
> typically, report a query time of 500ms. Repeating the query
> immediately will report a query time of around 50ms.
>
> Performing the same, or similar, queries vis my dnsmasq server will
> often report a query time of 3 or four seconds, while an immediate
> repeat will report a query time of 0 or 1ms. Similarly, queries for
> locally defined addresses, will report 0ms query times.
>
> My conclusion from these tests is that dnsmasq takes an inordinately
> long time to return a query for an address that is neither in its
> cache, nor, possibly, in the ISP's dns server cache.

Does dnsmasq forward requests to your ISP's DNS servers? I believe this
is what you are implying, but it will be easier to isolate the problem
if this is the case.

    Cheers,
    guns
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140816/9b381bd2/attachment.sig>


More information about the Dnsmasq-discuss mailing list