Re: dnscache performance still applicable today?

James Sutherland <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
On 24 May 2009, at 14:50, Rihad wrote:

> Why I asked: dnscache's log file has stats lines like:
> 2009-05-24 18:42:48.254665500 stats 2098047 158736598 190 0
>
> According to dnscache log file description at http://www.dqd.com/~mayoff/notes/djbdns/dnscache-log.html#stats
> the third number after stats (190) means:
>
> udp-active  	The number of queries that dnscache has received via  
> UDP but not yet responded to or dropped.
>
> Am I right in assuming that dnscache's single thread of execution  
> becomes its main bottleneck, so it has to delay query execution  
> while processing current requests?
>
> Probably when dnscache was written the load on the Internet was  
> lighter, and SMP computers were rare, unlike today. Any advancements  
> in this area?

No, this just means you have 190 queries currently waiting for  
something to happen - presumably awaiting replies from remote DNS  
servers. Your CPU speed will have no real bearing on this figure: a  
remote server will take a certain time to respond to dnscache's query  
whether dnscache is running on a Cray or a PDA. It certainly does  
handle multiple concurrent requests - indeed, at the moment that log  
entry was written, it was in the process of handling 190 of them  
simultaneously! As another message says, your 6% CPU usage is probably  
6% of a single core, rather than 6% of the total CPU capacity of the  
system.

 From the lines you've posted, your system has processed just under  
2.1m queries in 24 minutes of CPU runtime, i.e. an average of just  
under 700 microseconds per query, nearly 1500 queries per CPU-second.  
Very few entities will have enough DNS queries to max out a single  
modern CPU core running dnscache - and most of those that do (large  
ISPs, OpenDNS etc) would normally want to spread the load out across  
multiple servers, rather than scaling up to one or two very large  
machines. You certainly don't seem to be anywhere near to needing more  
than one core for your own cache yet, from the two lines you've  
posted, unless you need to handle massive spikes in traffic.

-- 
James Sutherland.
smime.p7s (application/pkcs7-signature, 4.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.