X-Git-Url: https://git.cworth.org/git?p=notmuch-wiki;a=blobdiff_plain;f=performance.mdwn;h=7f9f7dc7903cb6c7638328a4524d1c9e9596edcd;hp=14f96a01363c643671f4062bb8cfaf45e7a209ff;hb=HEAD;hpb=7c0053ea27fcbf116d7e1ba9d1c538ee8c70f7a9 diff --git a/performance.mdwn b/performance.mdwn index 14f96a0..664d67d 100644 --- a/performance.mdwn +++ b/performance.mdwn @@ -74,31 +74,17 @@ make regular backups of your notmuch database: ### Compact your database -In order to greatly reduce the size of your database, you should -compact it. Carl says "This functionality is not yet available in the -Xapian library interface or else I would probably make notmuch call it -after building the database." and Pieter "[compacting] will cause -writes to be a bit more expensive in the short term, but will -significantly reduce the db's size, which your SSD will surely -appreciate." +In order to greatly reduce the size of your database, you should compact it. +This can be easily achieved with `notmuch compact`: -This needs xapian 1.2 - -Backup your database: - - $ cd - $ notmuch dump --output=notmuch-dump-b4compact - -Compact it: - - $ cd $(notmuch config get database.path)/.notmuch - $ xapian-compact --no-renumber xapian xapian-compacted - -Remove old and renamed compacted, if compacting went well: - - $ rm -R xapian - $ mv xapian-compacted xapian + $ notmuch compact +Note that this process can take a long time for large database and a write lock +will be held for the duration to ensure data integrity. The process will create +a new compacted database in a temporary directory and finally replace the +original database if compaction is successful. For added safety you can provide +`--backup=` option to preserve a copy of the original database. For +more details on this process see `notmuch-compact` man page. ### More information about this in the email archives: @@ -107,3 +93,9 @@ Remove old and renamed compacted, if compacting went well: * [Sebastian Spaeth](https://notmuchmail.org/pipermail/notmuch/2011/004048.html) * [Pieter Praet](https://notmuchmail.org/pipermail/notmuch/2011/004175.html) + +## Performance test suite + +Notmuch ships with a [[performance test suite|perf-test]] which uses a downloadable +[[corpus]] of email. +