mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 12:32:04 -04:00
Waking up once a second to clean one bucket is excessive. Change the
default values (and dependencies) so that the clenup routine is called once ever 30 seconds and cleans 8-9 buckets.
This commit is contained in:
parent
dfb0717d75
commit
7b5172166d
1 changed files with 6 additions and 15 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.c,v 1.165 2001/01/22 22:53:13 gson Exp $ */
|
||||
/* $Id: adb.c,v 1.166 2001/01/26 03:20:58 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation notes
|
||||
|
|
@ -76,8 +76,6 @@
|
|||
* The number of buckets needs to be a prime (for good hashing).
|
||||
*
|
||||
* XXXRTH How many buckets do we need?
|
||||
*
|
||||
* This value must be coordinated with CLEAN_SECONDS (below).
|
||||
*/
|
||||
#define NBUCKETS 1009 /* how many buckets for names/addrs */
|
||||
|
||||
|
|
@ -91,19 +89,12 @@
|
|||
#define ADB_CACHE_MAXIMUM 86400 /* seconds (86400 = 24 hours) */
|
||||
|
||||
/*
|
||||
* Clean CLEAN_BUCKETS buckets every CLEAN_SECONDS.
|
||||
* Wake up every CLEAN_SECONDS and clean CLEAN_BUCKETS buckets, so that all
|
||||
* buckets are cleaned in CLEAN_PERIOD seconds.
|
||||
*/
|
||||
#define CLEAN_PERIOD 3600 /* one pass through every N seconds */
|
||||
#define CLEAN_BUCKETS ((NBUCKETS / CLEAN_PERIOD) + 0.5)
|
||||
#if CLEAN_BUCKET < 1
|
||||
#undef CLEAN_BUCKETS
|
||||
#define CLEAN_BUCKETS 1
|
||||
#endif
|
||||
#define CLEAN_SECONDS (CLEAN_PERIOD * CLEAN_BUCKETS / NBUCKETS)
|
||||
#if CLEAN_SECONDS < 1
|
||||
#undef CLEAN_SECONDS
|
||||
#define CLEAN_SECONDS 1
|
||||
#endif
|
||||
#define CLEAN_PERIOD 3600
|
||||
#define CLEAN_SECONDS 30
|
||||
#define CLEAN_BUCKETS ((NBUCKETS * CLEAN_SECONDS) / CLEAN_PERIOD)
|
||||
|
||||
#define FREE_ITEMS 64 /* free count for memory pools */
|
||||
#define FILL_COUNT 16 /* fill count for memory pools */
|
||||
|
|
|
|||
Loading…
Reference in a new issue