diff options
author | Eric Wong <e@80x24.org> | 2021-07-25 12:44:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-07-25 21:08:03 +0000 |
commit | 7a85c3cd6c7c0257a04343ca345cf0f23d71729c (patch) | |
tree | 0e53e195ae11c14b14fa7cf9af4ef72b1a739857 /lib/PublicInbox | |
parent | cef5cda178a0e57c69ba19b6aed6b7eba1ee7594 (diff) | |
download | public-inbox-7a85c3cd6c7c0257a04343ca345cf0f23d71729c.tar.gz |
This wasn't wired up properly, but Xapian appears to suffer from I/O amplification problems as DB shards get larger: https://lists.xapian.org/pipermail/xapian-discuss/2019-February/009727.html <23640.32170.703368.841021@y.dockes.com> Of course, we shouldn't have too many shards, either; because performance problems with too many shards was the entire reason extindex was created: https://lists.xapian.org/pipermail/xapian-discuss/2020-August/009823.html <20200826064728.GA32239@dcvr>
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index fb1f511e..22edbb4b 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -52,7 +52,8 @@ sub new { parallel => 1, lock_path => "$dir/ei.lock", }, __PACKAGE__; - $self->{shards} = $self->count_shards || nproc_shards($opt->{creat}); + $self->{shards} = $self->count_shards || + nproc_shards({ nproc => $opt->{jobs} }); my $oidx = PublicInbox::OverIdx->new("$self->{xpfx}/over.sqlite3"); $self->{-no_fsync} = $oidx->{-no_fsync} = 1 if !$opt->{fsync}; $self->{oidx} = $oidx; |