about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2024-04-24 06:44:44 +0000
committerEric Wong <e@80x24.org>2024-04-24 21:34:45 +0000
commit5aa2ba6d74c3f6a7f62a091e5df8346bb6d5b35a (patch)
tree3788be2959493045563eb3dfa300b3fba06d96e0
parent0d6d6d48197b3787a11c4e65f92d9e317c14f85b (diff)
downloadpublic-inbox-5aa2ba6d74c3f6a7f62a091e5df8346bb6d5b35a.tar.gz
It's never straightforward to pick an ideal number of processes
for anything and Xapian helper processes are no exception since
there may be a massive disparities in CPU count and I/O
performance.  So default to a single worker for now in the C++
version since that's the default is for the Perl/(XS|SWIG)
version, and also the same as for our normal public-facing
daemons.

This keeps the behavior between the Perl+(XS|SWIG) and C++
version as similar as possible.
-rw-r--r--lib/PublicInbox/xap_helper.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h
index 3456910b..0e6805b3 100644
--- a/lib/PublicInbox/xap_helper.h
+++ b/lib/PublicInbox/xap_helper.h
@@ -945,12 +945,6 @@ int main(int argc, char *argv[])
         }
 
         nworker = 1;
-#ifdef _SC_NPROCESSORS_ONLN
-        long j = sysconf(_SC_NPROCESSORS_ONLN);
-        if (j > 0)
-                nworker = j > WORKER_MAX ? WORKER_MAX : j;
-#endif // _SC_NPROCESSORS_ONLN
-
         // make warn/warnx/err multi-process friendly:
         if (my_setlinebuf(stderr))
                 err(EXIT_FAILURE, "setlinebuf(stderr)");