]> granicus.if.org Git - pdns/commitdiff
documentation, retuned cache pruning - should take less time now
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 7 Apr 2006 19:52:10 +0000 (19:52 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 7 Apr 2006 19:52:10 +0000 (19:52 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@668 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/docs/pdns.sgml
pdns/pdns_recursor.cc
pdns/recursor_cache.cc

index 6184fbe1f804702605ccf88012155948fc9576bd..f937db84acc8f49238d3f3b7b128cf24a4e0a037 100644 (file)
@@ -5909,6 +5909,14 @@ local0.err                        /var/log/pdns.err
              </para>
            </listitem>
          </varlistentry>
+         <varlistentry>
+           <term>allow-from</term>
+           <listitem>
+             <para>
+               Comma separated netmasks that are allowed to use the server. The default allows complete access!
+             </para>
+           </listitem>
+         </varlistentry>
          <varlistentry>
            <term>client-tcp-timeout</term>
            <listitem>
@@ -5954,7 +5962,7 @@ local0.err                        /var/log/pdns.err
            <term>local-address</term>
            <listitem>
              <para>
-               Local IP address (singular) to bind to. Defaults to all addresses.
+               Local IP addresses to bind to, comma separated. Defaults to all addresses.
              </para>
            </listitem>
          </varlistentry>
@@ -5967,6 +5975,14 @@ local0.err                        /var/log/pdns.err
              </para>
            </listitem>
          </varlistentry>
+         <varlistentry>
+           <term>max-cache-entries</term>
+           <listitem>
+             <para>
+               Maximum number of cache entries. 1 million will generally suffice for most installations.
+             </para>
+           </listitem>
+         </varlistentry>
          <varlistentry>
            <term>max-tcp-clients</term>
            <listitem>
@@ -5991,6 +6007,14 @@ local0.err                        /var/log/pdns.err
              </para>
            </listitem>
          </varlistentry>
+         <varlistentry>
+           <term>socket-dir</term>
+           <listitem>
+             <para>
+               Where to store the control socket. This option also works with the controller, <command>rec_control</command>.
+             </para>
+           </listitem>
+         </varlistentry>
          <varlistentry>
            <term>trace</term>
            <listitem>
index a189135208e78fc1e37073bb83f486f102dec22c..9e853ccefb28c8229c61ecdab3228e862a5b5e11 100644 (file)
@@ -560,7 +560,7 @@ static void houseKeeping(void *)
   struct timeval now;
   gettimeofday(&now, 0);
 
-  if(now.tv_sec - last_prune > 60) { 
+  if(now.tv_sec - last_prune > 300) { 
     DTime dt;
     dt.setTimeval(now);
     RC.doPrune();
@@ -578,7 +578,7 @@ static void houseKeeping(void *)
       else
        ++i;
 
-    //    cerr<<"Pruned "<<pruned<<" records, left "<<SyncRes::s_negcache.size()<<"\n";
+    //   cerr<<"Pruned "<<pruned<<" records, left "<<SyncRes::s_negcache.size()<<"\n";
 //    cout<<"Prune took "<<dt.udiff()<<"usec\n";
     last_prune=time(0);
   }
index ce7fa2f243f9004cec1bd590a12ad138148e492a..c29a34c017e8bccd814c70889bf2371ba2d46265 100644 (file)
@@ -225,15 +225,15 @@ void MemRecursorCache::doPrune(void)
   
   unsigned int cacheSize=d_cache.size();
 
-  if(maxCached && cacheSize > maxCached)
+  if(maxCached && cacheSize > maxCached) {
     toTrim = cacheSize - maxCached;
+  }
 
   //  cout<<"Need to trim "<<toTrim<<" from cache to meet target!\n";
 
   typedef cache_t::nth_index<1>::type sequence_t;
   sequence_t& sidx=d_cache.get<1>();
 
-
   unsigned int tried=0, lookAt, erased=0;
 
   // two modes - if toTrim is 0, just look through 10000 records and nuke everything that is expired
@@ -241,7 +241,7 @@ void MemRecursorCache::doPrune(void)
   if(toTrim)
     lookAt=5*toTrim;
   else
-    lookAt=cacheSize/50;
+    lookAt=cacheSize/10;
 
 
   sequence_t::iterator iter=sidx.begin(), eiter;