All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: tools@linux.kernel.org, users@kernel.org, meta@public-inbox.org
Subject: Re: Does anyone have any tips for efficient lei and dovecot integration?
Date: Sat, 7 Jun 2025 00:04:57 +0000	[thread overview]
Message-ID: <20250607000457.M642647@dcvr> (raw)
In-Reply-To: <014a1fdf240ef70f00dd8dd2bfcde7b234b41e31.camel@HansenPartnership.com>

James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> Thanks.  --no-import-before seems to have stopped store growing ... is
> there any way I can shrink it?

Not easily in a fine-grained way.  I *think*
`rm -rf ~/.local/share/lei/store' (but keeping
~/.local/share/lei/saved-searches) should be OK but I haven't
tested.  Theoretically we could add support for purging
individual messages from it (like public-inbox-purge).

You can also use normal git-gc || SQLite VACUUM ||
xapian-compact to reduce space losslessly.  We can probably add
`lei compact' to wrap xapian-compact similar to what
public-inbox-compact does; and probably add SQLite VACUUM
support to both of those xapian-compact wrappers.

> On Fri, 2025-06-06 at 18:02 +0000, Eric Wong wrote:
> > AFAIK, dovecot uses inotify||kevent to detect changes to its
> > Maildirs.  I never needed to run `doveadm force-resync' after
> > writing with 3rd-party tools (e.g. lei, mutt) to Maildirs used
> > by dovecot.
> 
> Well, it can, yes, but my setup is a fraction of a terrabyte of imap
> running all my subscriptions, which is pretty huge and fanotify can be
> a bit unscalable in something that big, so I have it turned off and I
> simply used dovecot-lda for local delivery via procmail to make sure
> everything got noticed immediately.

Ouch, yeah.

I actually have an idea to flip things by exposing lei/store
data as Maildirs via FUSE3 so there'd be no need for Maildirs
on regular FSes at all.

I'm not sure if the performance of the mainline perl
implementation + FUSE3 shim will be fast enough to handle
lots of small files even w/ readdirplus.  Or just bypass Perl
and just use FUSE3+SQLite+git but there's still syscall
amplification from all those layers.


sidenote: I completely forgot fanotify exists since the
early versions required CAP_SYS_ADMIN :x

      reply	other threads:[~2025-06-07  0:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30 18:46 Does anyone have any tips for efficient lei and dovecot integration? James Bottomley
2025-06-06 18:02 ` Eric Wong
2025-06-06 20:24   ` James Bottomley
2025-06-07  0:04     ` Eric Wong [this message]

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=20250607000457.M642647@dcvr \
    --to=e@80x24.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=meta@public-inbox.org \
    --cc=tools@linux.kernel.org \
    --cc=users@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.