2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

2019. [tuning] Reduce the amount of work performed per quantum

when cleaning the cache. [RT #15986]
This commit is contained in:
Mark Andrews
2006-05-16 03:54:35 +00:00
parent dc1f18f211
commit b66ca17f29
2 changed files with 8 additions and 4 deletions

View 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,