From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH 2/8] xap_helper.h: remove _SC_NPROCESSORS_ONLN default
Date: Wed, 24 Apr 2024 01:34:14 +0000 [thread overview]
Message-ID: <20240424013420.476353-2-e@80x24.org> (raw)
In-Reply-To: <20240424013420.476353-1-e@80x24.org>
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 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)");
next prev parent reply other threads:[~2024-04-24 1:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 1:34 [PATCH 1/8] searchview: get rid of unused adump callback arg Eric Wong
2024-04-24 1:34 ` Eric Wong [this message]
2024-04-24 1:34 ` [PATCH 3/8] xap_helper: drop terms+data from `mset' command Eric Wong
2024-04-24 1:34 ` [PATCH 4/8] mbox: hoist out refill_result_ids Eric Wong
2024-04-24 1:34 ` [PATCH 5/8] www: start wiring up search to use async xap_helper Eric Wong
2024-04-24 1:34 ` [PATCH 6/8] mset: mbox Eric Wong
2024-04-24 1:34 ` [PATCH 7/8] WIP thread bad mbox Eric Wong
2024-04-24 1:34 ` [PATCH 8/8] mbox: fixup Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240424013420.476353-2-e@80x24.org \
--to=e@80x24.org \
--cc=spew@80x24.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).