]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2019. [tuning] Reduce the amount of work performed per quantum
authorMark Andrews <marka@isc.org>
Tue, 16 May 2006 03:57:15 +0000 (03:57 +0000)
committerMark Andrews <marka@isc.org>
Tue, 16 May 2006 03:57:15 +0000 (03:57 +0000)
                        when cleaning the cache. [RT #15986]

CHANGES
lib/dns/cache.c

diff --git a/CHANGES b/CHANGES
index 5e709a7662365caef0c40d1a2fba91f12a0533a8..f2846b233c1f4f875d46070cfeeae7420b0e3301 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2019.  [tuning]        Reduce the amount of work performed per quantum
+                       when cleaning the cache. [RT #15986]
+
 2018.  [bug]           Checking if the HMAC MD5 private file was broken.
                        [RT #15960]
 
index e79b42a27b71d9035b92bbf8f21ae9db9b42656b..73608b84e80e59441386b1c333fcbba4b438edd5 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: cache.c,v 1.57.18.12 2006/05/04 02:20:37 marka Exp $ */
+/* $Id: cache.c,v 1.57.18.13 2006/05/16 03:57:15 marka Exp $ */
 
 /*! \file */
 
@@ -212,15 +212,16 @@ adjust_increment(cache_cleaner_t *cleaner, unsigned int remaining,
        }
 
        new = (names * interval);
-       new /= usecs;
+       new /= (usecs * 2);
        if (new == 0)
                new = 1;
-       else if (new > DNS_CACHE_CLEANERINCREMENT)
-               new = DNS_CACHE_CLEANERINCREMENT;
 
        /* Smooth */
        new = (new + cleaner->increment * 7) / 8;
 
+       if (new > DNS_CACHE_CLEANERINCREMENT)
+               new = DNS_CACHE_CLEANERINCREMENT;
+
        cleaner->increment = (unsigned int)new;
 
        isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,