unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: Eric Wong <e@80x24.org>
Cc: "Robin H. Johnson" <robbat2@gentoo.org>,
	meta@public-inbox.org, infra@gentoo.org
Subject: Re: public-inbox skipping new inboxes or many mails
Date: Tue, 16 Jul 2024 05:45:17 +0000	[thread overview]
Message-ID: <robbat2-20240716T053306-019353707Z@orbis-terrarum.net> (raw)
In-Reply-To: <20240715235808.M590962@dcvr>

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

On Mon, Jul 15, 2024 at 11:58:08PM +0000, Eric Wong wrote:
> > On Mon, Jul 15, 2024 at 09:03:40PM +0000, Eric Wong wrote:
> > > Currently, public-inbox-watch is the only public-inbox-* tool which
> > > works directly with Maildirs.
> > HMm, I had excluded public-inbox-watch initially because it didn't seem
> > to be doing anything after the very long startup. I'm thinking that the
> > inotify is not working as expected, maybe relating to the huge number of
> > folders we watch.
> 
> -watch is (or should be) doing a full scan every startup, but it
> switches between inboxes every few messages and tries to
> prioritize new messages from inotify.   Curious to see the
> strace immediately after startup to see if it's indeed doing the
> full scan.  I should probably add a stderr diagnostic for full
> scan completion...
It's definitely very busy after scan, but I can't tell if it's the full
set.

At an admin level, is there a way to dump out all of the paths it's
indexes, to compare against the paths on disk?

> How many Maildirs are you watching?  I wonder if it's hitting
> RLIMIT_NOFILE... (errors should be logged to stderr).
6774 Maildirs right now.
I should probably improve the OpenRC script for it, I think we're
throwing away stderr right now for -watch.

RLIMIT_NOFILE 1M
sysctl fs.file-max 16M

> > Terminal 1:
> > # strace -p $(pidof /usr/bin/public-inbox-watch)  -ff 
> > strace: Process 93260 attached
> > pselect6(8, [3 4], NULL, NULL, NULL, NULL
> > (nothing more)
> Curious, which architecture is that and is it using
> Linux::Inotify2 or inotify via the `syscall' perlop?
> (I expect 3 is the inotify FD).
x86-64, dev-perl/Linux-Inotify2 is installed on the host, but I can't
tell at a glance if -watch used perlop or package.

fd 3 is inotify & fd 4 is signalfd.

> 
> You may also be running into fs.inotify.max_user_watches or
> max_queued_events sysctl limits; each Maildir costs 2 inotify
> watches; and it looks like I forgot to handle IN_Q_OVERFLOW
> properly :x
Already set quite high:
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 1024
fs.inotify.max_user_watches = 65536

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1113 bytes --]

  reply	other threads:[~2024-07-16  5:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15  6:15 public-inbox skipping new inboxes or many mails Robin H. Johnson
2024-07-15 21:03 ` Eric Wong
2024-07-15 21:45   ` Robin H. Johnson
2024-07-15 23:58     ` Eric Wong
2024-07-16  5:45       ` Robin H. Johnson [this message]
2024-07-16 19:05         ` Eric Wong
2024-07-17  3:04           ` Robin H. Johnson
2024-07-17 23:25             ` Eric Wong
2024-07-17 23:50               ` Eric Wong
2024-07-18  0:02               ` Robin H. Johnson

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

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=robbat2-20240716T053306-019353707Z@orbis-terrarum.net \
    --to=robbat2@gentoo.org \
    --cc=e@80x24.org \
    --cc=infra@gentoo.org \
    --cc=meta@public-inbox.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).