<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#002060">The parameter that is glaringly missing from your list is “recursive-clients”. Do you have that set at default value (1000) or have you bumped it up higher?
 Since you say that this happens at “peak hours”, recursive-clients is the prime suspect, since it governs how many *<b>simultaneous</b>* recursive requests can be handled. Note that you should see some indication in your logs if you’re running into a recursive-clients
 limit. Also, you can see the current number of recursive clients, in real time, via the “rndc status” display. Check whether you’re at or close to your limit.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#002060">If that doesn’t pan out, I’d also look at this from the networking standpoint. The servers that are experiencing high response times, are they on congested
 links? High-latency links? Was there some sort of anomalies occurring at the time of the high response times, e.g. high packet loss? Ultimately, you might have to mimic resolution of some of the “slow” queries using a command-line tool like “dig” (with recursion
 turned off, possibly the +trace option is useful here) and/or take packet captures to identify the source of the slowness. It’s quite possible that your “peak hours” are peak hours for your Internet providers as well, so the network characteristics of your
 connections may be less than acceptable at those times.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#002060">                                                                                                                - Kevin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> bind-users-bounces@lists.isc.org [mailto:bind-users-bounces@lists.isc.org]
<b>On Behalf Of </b>alaa m zidan<br>
<b>Sent:</b> Monday, January 26, 2015 3:26 PM<br>
<b>To:</b> bind-users@lists.isc.org<br>
<b>Subject:</b> BIND response time is relatively high<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div id="yui_3_16_0_1_1422302973979_7455">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">hi ,<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7454">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7453">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">I noticed that at peak hours, BIND response time is relatively high for some servers.<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7456">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">non-cached query takes over 700ms<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7459">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">I set some kernel parameters to tune the network and sockets for redhat 6 and set some global options to tune the BIND by modifying the cache settings,
 but neither I get the cache I set the limit to filed up, nor I get better performance.<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7460">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7812">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">some settings are as below,<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7553">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">kernel sysctl:<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7813">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">============<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7540">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">net.ipv4.ip_local_port_range = 1024 65535<br>
net.ipv4.tcp_tw_recycle = 1<br>
net.ipv4.tcp_tw_reuse = 1<br>
net.core.rmem_max = 33554432<br>
net.core.wmem_max = 33554432<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7567">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">net.ipv4.tcp_max_syn_backlog = 16384<br>
net.ipv4.tcp_max_orphans = 400000<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7568">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">net.core.somaxconn = 4096<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7576">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">net.ipv4.tcp_rmem = 4096 87380 33554432<br>
net.ipv4.tcp_wmem = 4096 65536 33554432<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7570">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7575">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7613">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">bind named.conf global options:<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7574">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">=========================<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7618">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">        cleaning-interval 1440;<br>
        max-cache-ttl 2419200;<br>
        max-ncache-ttl 86400;<br>
        max-cache-size 5120m;<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7616">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7619">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">server specs:<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7637">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">===========<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7620">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">memory is 8GB<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7573">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">memory usage is not exceeding 20% or 1.7GB while the cache is limited to 5GB as shown in the settings above, i wouldn't be more happier if i could have
 seen memory utilization spikes to the sky.<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7785">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7784">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">could you please suggest !!!<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7796">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7815">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black">thanks<o:p></o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7814">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7780">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7657">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<div id="yui_3_16_0_1_1422302973979_7572">
<p class="MsoNormal" style="background:white"><span style="font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
</div>
</div>
</body>
</html>