]> 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:54:35 +0000 (03:54 +0000)
committerMark Andrews <marka@isc.org>
Tue, 16 May 2006 03:54:35 +0000 (03:54 +0000)
                        when cleaning the cache. [RT #15986]

CHANGES
lib/dns/cache.c

diff --git a/CHANGES b/CHANGES
index 44461ac4a9dfb36e4240a5f8025f1d425ff3cb1c..525a6c4498bf0b7114d2758f6e49750833d018c0 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 8f1fb11a1eafda5be4fd4e4f4494c22c172b0c4b..2019aeaae67376d4c0e6b017ba1be9a050d719a4 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: cache.c,v 1.69 2006/05/04 02:24:06 marka Exp $ */
+/* $Id: cache.c,v 1.70 2006/05/16 03:54:35 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,