]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't limit the size of uvreq/nmhandle pool artificially.
authorWitold Kręcicki <wpk@isc.org>
Mon, 10 Feb 2020 13:00:36 +0000 (14:00 +0100)
committerWitold Krecicki <wpk@isc.org>
Tue, 11 Feb 2020 12:10:57 +0000 (12:10 +0000)
There was a hard limit set on number of uvreq and nmhandles
that can be allocated by a pool, but we don't handle a situation
where we can't get an uvreq. Don't limit the number at all,
let the OS deal with it.

lib/isc/netmgr/netmgr.c

index 6f929c6d2c8c5c6a33816be7ad16fe4db2adca38..c66e568dce4038c1cf8143fc9a92da060296ab5b 100644 (file)
@@ -174,8 +174,7 @@ isc_nm_start(isc_mem_t *mctx, uint32_t workers) {
        isc_mutex_init(&mgr->reqlock);
        isc_mempool_create(mgr->mctx, sizeof(isc__nm_uvreq_t), &mgr->reqpool);
        isc_mempool_setname(mgr->reqpool, "nm_reqpool");
-       isc_mempool_setmaxalloc(mgr->reqpool, 32768);
-       isc_mempool_setfreemax(mgr->reqpool, 32768);
+       isc_mempool_setfreemax(mgr->reqpool, 4096);
        isc_mempool_associatelock(mgr->reqpool, &mgr->reqlock);
        isc_mempool_setfillcount(mgr->reqpool, 32);
 
@@ -183,8 +182,7 @@ isc_nm_start(isc_mem_t *mctx, uint32_t workers) {
        isc_mempool_create(mgr->mctx, sizeof(isc__netievent_storage_t),
                           &mgr->evpool);
        isc_mempool_setname(mgr->evpool, "nm_evpool");
-       isc_mempool_setmaxalloc(mgr->evpool, 32768);
-       isc_mempool_setfreemax(mgr->evpool, 32768);
+       isc_mempool_setfreemax(mgr->evpool, 4096);
        isc_mempool_associatelock(mgr->evpool, &mgr->evlock);
        isc_mempool_setfillcount(mgr->evpool, 32);