Discussion:
[Dnsmasq-discuss] Measuring dnsmasq performance
John Knight
2016-11-09 22:58:53 UTC
Permalink
Hi All,

I have been tasked with measuring performance of dnsmasq on our routers. My guess is that dnsmasq has already been analyzed... so I am hoping to leverage any work that has already been done. Specifically, I am hoping to find out what tools are recommended to measure dnsmasq dns and dhcp performance? Has dnsmasq 2.76's performance been measured already? If so, have results been published? And lastly, has there been any performance improvements to dnsmasq since dnsmasq 2.55?

Thanks for your help.

Best Regards,

John Knight

__________________________________________________________________ Confidential This e-mail and any files transmitted with it are the property of Belkin International, Inc. and/or its affiliates, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipients or otherwise have reason to believe that you have received this e-mail in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Pour la version fran?aise: http://www.belkin.com/email-notice/French.html F?r die deutsche ?bersetzung: http://www.belkin.com/email-notice/German.html __________________________________________________________________
Albert ARIBAUD
2016-11-10 08:51:21 UTC
Permalink
Hi,
Post by John Knight
Hi All,
I have been tasked with measuring performance of dnsmasq on our
routers. My guess is that dnsmasq has already been analyzed... so I
am hoping to leverage any work that has already been done.
Specifically, I am hoping to find out what tools are recommended to
measure dnsmasq dns and dhcp performance? Has dnsmasq 2.76's
performance been measured already? If so, have results been
published? And lastly, has there been any performance improvements
to dnsmasq since dnsmasq 2.55?
Thanks for your help.
Best Regards,
John Knight
I don't really have answers to your questions, and I am sorry that I
will actually add more questions in fact, because the way you spelled
your question I am wondering whether we are looking at a technical or
PHB request if you'l allow me. :)

So:

What do you mean by performance? Network? CPU? Memory? Filesystem? And
in each of these categories, what factor exactly are you looking at?

Amicalement,
Albert.
John Knight
2016-11-10 19:19:30 UTC
Permalink
Hi Albert,

I know performance is going to vary greatly depending on CPU horsepower, memory available, etc... all platform specifics. However, by performance, I am interested in learning the following for dnsmasq:
1) How quick can dnsmasq service a dns request if the address is cached and if the address is not cached? I am interested in measuring best case performance of doing a dns lookup of an address, as well as determining typical lookup time for cached and non-cached addresses.
2) Is there a performance difference if the cache size is increased from default of 150 to 1024 to 2048 to 4096 or more entries?
3) If there is a difference in performance when cache size is increased, how is performance degradation characterized? Is it linear?
4) Is there an implementation limit on the cache size? What would be the suggested maximum cache size assuming we have sufficient memory to support it?
5) Is there an estimate on memory usage per cached dns address? I need this to set cache size appropriately for our routers; some have limited memory and some have much more memory available. How much memory is required to store default of 150 cached addresses? 1024 addresses? 4096 addresses? Etc.
6) How many dns lookups per second can dnsmasq service? Cached and non-cached and mixed?
7) Is dnsmasq able to service multiple requests in parallel or is it serialized? Suppose two dnsmasq queries are received at the same time (sequentially back to back)... first one for a non-cached address, and second for a cached address. Will dnsmasq be able to reply with cached address before it replies to the non-cached address query? Is it handled serially or can it handle both queries in parallel? If dnsmasq can process these requests in parallel, how many queries can it handle in parallel?
6) Since we also use dnsmasq for dhcp, I would also be interested in determining how long it takes to service a dhcp request to provide an IPv4 address?

Thus far, I have used "time nslookup" for individual dns address queries, but time resolution is not very granular and also includes time to load nslookup and print results, so it is hard to know exactly how much time is nslookup processing and how much time is dnsmasq. I have also found an opensource program called namebench which is intended to help you benchmark relative performance between dns servers; this reports best time response, response time range (min and max), average time, and also attempts to test for all cached, 50/50 cached/non-cached, and all cache miss. And of course, it compares the dns server of your choice to various public dns servers. So it is useful... but doesn't give all of the answers.

I guess to put it another way, I am looking for enough data to determine the best and fastest configuration of dnsmasq. I want to tune our configuration so we get all that we can out of dnsmasq.

I hope this helps,

John


-----Original Message-----
From: Albert ARIBAUD [mailto:***@free.fr]
Sent: Thursday, November 10, 2016 12:51 AM
To: John Knight
Cc: dnsmasq-***@lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] Measuring dnsmasq performance

Hi,
Post by John Knight
Hi All,
I have been tasked with measuring performance of dnsmasq on our
routers. My guess is that dnsmasq has already been analyzed... so I
am hoping to leverage any work that has already been done.
Specifically, I am hoping to find out what tools are recommended to
measure dnsmasq dns and dhcp performance? Has dnsmasq 2.76's
performance been measured already? If so, have results been
published? And lastly, has there been any performance improvements to
dnsmasq since dnsmasq 2.55?
Thanks for your help.
Best Regards,
John Knight
I don't really have answers to your questions, and I am sorry that I will actually add more questions in fact, because the way you spelled your question I am wondering whether we are looking at a technical or PHB request if you'l allow me. :)

So:

What do you mean by performance? Network? CPU? Memory? Filesystem? And in each of these categories, what factor exactly are you looking at?

Amicalement,
Albert.

__________________________________________________________________ Confidential This e-mail and any files transmitted with it are the property of Belkin International, Inc. and/or its affiliates, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipients or otherwise have reason to believe that you have received this e-mail in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Pour la version française: http://www.belkin.com/email-notice/French.html Für die deutsche Übersetzung: http://www.belkin.com/email-notice/German.html __________________________________________________________________
Weedy
2016-11-11 07:20:21 UTC
Permalink
Post by John Knight
1) How quick can dnsmasq service a dns request if the address is cached and if the address is not cached? I am interested in measuring best case performance of doing a dns lookup of an address, as well as determining typical lookup time for cached and non-cached addresses.
2) Is there a performance difference if the cache size is increased from default of 150 to 1024 to 2048 to 4096 or more entries?
3) If there is a difference in performance when cache size is increased, how is performance degradation characterized? Is it linear?
google's namebench
Ameretat Reith
2016-11-13 05:46:44 UTC
Permalink
Recently I was assigned to same task then built a tsung plugin to storm
resolvers, code is available here [1]. You can take a look at reports [2]
targetting bind and dnsmasq.

Reports are collected from a 5 hours run, increasing requests rate
gradually
from 100 per seconds to 500. I made two type of requests which are shown
as
tr_cached and tr_normal. Cached requests are knwon to dnsmasq by
"server=/domain/ip" in config and always being sent to dnsmasq which is
behind of bind or another dnsmasq based on scenario. Normal requests being
forwarded to top level resolver. I used only a couple of domains. Matched
counter shows number of responds which were correct, so there was no server
failure here and resolver returned expected IP. Matched counter counts
just
normal requests. Timeout counter is number of request timed out after 60
seconds. On UDP there is always some requests being forgotten.

I removed monitoring reports since they were related to client not server.
My goal was measuring service availability rather than performance.

I may retry this test with server resource charts included but for now I
can
say on highest load on bind, one cores of a 2.8G Xenon CPU was saturated
while dnsmasq CPU usage was never noticable. Maybe another test targetting
many concurrent requests of different domains show constrasting result, but
even on wild production scenarios we often see dnsmasq resource usage
remain
very low and instead It won't respond to some requests (reaching max number
of forwarding requests)

Hope It helps.

1: https://github.com/reith/tsung_dns
2: http://file.reith.ir/dns-tsung-report.tar.gz

Loading...