]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable setting the thread affinity
authorOndřej Surý <ondrej@isc.org>
Tue, 13 Jul 2021 07:51:49 +0000 (09:51 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 13 Jul 2021 13:47:13 +0000 (15:47 +0200)
It was discovered that setting the thread affinity on both the netmgr
and netthread threads lead to inconsistent recursive performance because
sometimes the netmgr and netthread threads would compete over single
resource and sometimes not.

Removing setting the affinity causes a slight dip in the authoritative
performance around 5% (the measured range was from 3.8% to 7.8%), but
the recursive performance is now consistently good.

(cherry picked from commit a9e6a7ae57efec797d150da4021caf25067844c5)

lib/isc/netmgr/netmgr.c
lib/isc/unix/socket.c

index c6bcaea16db73c171467fd1b70a9ee71bbc64176..16310318e67ada54c3042a53f5495086e4dcf0b5 100644 (file)
@@ -722,7 +722,6 @@ nm_thread(isc_threadarg_t worker0) {
        isc_nm_t *mgr = worker->mgr;
 
        isc__nm_tid_v = worker->id;
-       isc_thread_setaffinity(isc__nm_tid_v);
 
        while (true) {
                /*
index bc260d222f13844c969f6a8202d2868a8ce2f065..d8097292294629a4a60d762cff00e18c4f093ae5 100644 (file)
@@ -3358,9 +3358,6 @@ netthread(void *uap) {
        (void)manager;
        bool done;
        int cc;
-       if (manager->nthreads > 1) {
-               isc_thread_setaffinity(thread->threadid);
-       }
 #ifdef USE_KQUEUE
        const char *fnname = "kevent()";
 #elif defined(USE_EPOLL)