about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-03 02:06:16 +0000
committerEric Wong <e@80x24.org>2021-01-03 18:30:32 +0000
commit02ff5cc7ecfe3e36cdd1898c4747c28d83de0e1a (patch)
tree2ca6a9f8f2f7c09f1157362d06d896cf49aeeb3a /lib/PublicInbox/V2Writable.pm
parent71461c67fee940b05309baa8c67bac10c8c51ac6 (diff)
downloadpublic-inbox-02ff5cc7ecfe3e36cdd1898c4747c28d83de0e1a.tar.gz
This fixes a performance regression in multi-process v2 indexing
due to the switch to PublicInbox::IPC.  While Unix sockets are
fewer FDs to manage, pipes allow unprivileged processes to use
larger buffers (up to 1M) on out-of-the-box Linux instances.

A larger buffer via F_SETPIPE_SZ afforded by pipes was proven
valuable during v2 development in 2018 and continues to be
valuable when we get significant amounts of one-way traffic from
the producer parent to worker children.

Compression may be an option for systems without F_SETPIPE_SZ;
but it increases CPU usage with no memory bandwidth savings on
hosts where larger buffers are available.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index c4efbdd2..6be95979 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -823,7 +823,7 @@ sub content_exists ($$$) {
 sub atfork_child {
         my ($self) = @_;
         if (my $older_siblings = $self->{idx_shards}) {
-                $_->shard_atfork_child for @$older_siblings;
+                $_->ipc_sibling_atfork_child for @$older_siblings;
         }
         if (my $im = $self->{im}) {
                 $im->atfork_child;