unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* compacting the notmuch database through systemd
@ 2019-12-01 20:52 Antoine Beaupré
  2019-12-02 13:29 ` Antoine Beaupré
  2019-12-04 18:09 ` Daniel Kahn Gillmor
  0 siblings, 2 replies; 12+ messages in thread
From: Antoine Beaupré @ 2019-12-01 20:52 UTC (permalink / raw)
  To: notmuch

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

Hi!

Thanks to Bremner, I just realized that notmuch-compact(1) is a thing,
and that thing allows me to compress my notmuch databases by about 50%.

So I whipped together two systemd units (attached) that will run that
command every month on my notmuch database. Just drop them in
`~/.config/systemd/user/` and run:

    systemctl --user daemon-reload
    systemctl --user enable notmuch-compact.timer
    systemctl --user start notmuch-compact.timer

... and you're done.

Maybe those could be shipped with the Debian package somehow? Not sure
how that works, but I think that's how gpg-agent gets started now, if
you want any inspiration...

It would be great if notmuch-new ran this on its own, when it
thought that this was "important", somehow like git-gc sometimes runs on
its own.

Of course, I suspect the 50% saving will not happen every month, but
hopefully this will keep my database size from exploding in the
future...

Finally, Bremner said that "it could make some operations slower to
compact the database, but I haven't notced that effect". That is strange
because the manpage says that compact "can both reduce the space
required by the database and improve lookup performance". ;) Hopefully,
the documentation is true and the rumors are false and the sky is not
falling and I want my mommy.

A.

PS: any humor or comedy in this email is purely accidental and shouldn't
be construed as a feeble attempt at making you smile.

-- 
I prefer the tumult of liberty to the quiet of servitude.
                        - Thomas Jefferson

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-12-12 22:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-01 20:52 compacting the notmuch database through systemd Antoine Beaupré
2019-12-02 13:29 ` Antoine Beaupré
2019-12-04 18:09 ` Daniel Kahn Gillmor
2019-12-04 19:51   ` Antoine Beaupré
2019-12-05 11:29     ` Jorge P. de Morais Neto
2019-12-05 11:38       ` Georg Faerber
2019-12-06 19:41         ` Daniel Kahn Gillmor
2019-12-08 14:38           ` Jorge P. de Morais Neto
2019-12-08 15:15             ` Chris Coutinho
2019-12-08 16:56             ` David Bremner
2019-12-12 22:44               ` Tomi Ollila
2019-12-05 17:02       ` Antoine Beaupré

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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).