dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] xap_helper.h: remove _SC_NPROCESSORS_ONLN default
@ 2024-04-24  0:13 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-04-24  0:13 UTC (permalink / raw)
  To: spew

It's never straightforward what number of processes is ideal for
the Xapian helper processes 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 as well as our normal
public-facing daemons.

This keeps the behavior between the Perl+(XS|SWIG) and C++
version as similar as possible.
---
 lib/PublicInbox/xap_helper.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h
index fb48f86f..5a89544a 100644
--- a/lib/PublicInbox/xap_helper.h
+++ b/lib/PublicInbox/xap_helper.h
@@ -948,12 +948,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)");

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-24  0:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24  0:13 [PATCH] xap_helper.h: remove _SC_NPROCESSORS_ONLN default Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).