]> git.notmuchmail.org Git - notmuch-wiki/blobdiff - performance.mdwn
NEWS for release 0.23.4
[notmuch-wiki] / performance.mdwn
index dcd70e0a24b84c98952a389d2f19e90610c54b17..250b07d78d8c39686d2146d762a797839251f110 100644 (file)
@@ -1,5 +1,20 @@
+[[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
 # Optimize notmuch's performance
 
+[[!toc levels=2]]
+
+## Use of ecryptfs slows notmuch down.
+
+I noticed that my `notmuch new` was really slow (several minutes) for
+less then 20 new emails (around 20K in my database).
+
+The performance tests in the notmuch source didn't show any real
+issue, even on a non-encrypted ext4 fs.
+
+After investigation and running different tests, a switch to a
+LUKS-btrfs based filesystem to replace the ext4-ecryptfs resolved the
+issue. It now takes some seconds to index hundreds of messages.
+
 ## Xapian 1.2.x database format: chert vs. flint
 
 Xapian 1.2 (in contrast to 1.0.x) uses a new database format called
@@ -18,21 +33,21 @@ database format, but also used in case of `chert`.
 
 ### Migrate from flint to chert
 
-1. make sure you are using xapian 1.2.x (depends on your distribution)
+Make sure you are using xapian 1.2.x (depends on your distribution)
 
-XXX: add examples
+XXX: add examples for different distributions
 
-2. Backup your notmuch tags
+Backup your notmuch tags:
 
     $ cd
-    $ notmuch dump notmuch-dump-b4chert
+    $ notmuch dump --output=notmuch-dump-b4chert
 
-3. Move away your old database
+Move away your old database:
 
     $ mv $(notmuch config get database.path)/.notmuch/ notmuch-db-b4chert
 
-4. Find and import your messages, a new and fresh database will be
-created.
+Find and import your messages, a new and fresh database will be
+created:
 
     $ XAPIAN_PREFER_CHERT=1 notmuch new
 
@@ -44,23 +59,21 @@ somebody more knowledgeable.
 After the initial import it is definitely not necessary to define
 `XAPIAN_PREFER_CHERT` for subsequent calls of `notmuch new`.
 
-5. Restore your tags
+Restore your tags:
 
-    $ notmuch restore notmuch-dump-b4chert
+    $ notmuch restore --input=notmuch-dump-b4chert
 
-6. Check whether you are on chert now.
+Check whether you are on chert now:
 
     $ ls $(notmuch config get database.path)/.notmuch/xapian/iam*
     iamchert
 
-If it says `iamflint`, most likely you are still using xapian 1.0.x.
-
-7. Clean-up
+  If it says `iamflint`, most likely you are still using xapian 1.0.x.
 
-If you are sure everything is fine, you can delete the old things. The
-dump of your tags you might want to keep anyway as a backup - on the
-other hand you should have some mechanism in place to make regular
-backups of your notmuch database.
+Clean-up: if you are sure everything is fine, you can delete the old
+things. The dump of your tags you might want to keep anyway as a
+backup - on the other hand you should have some mechanism in place to
+make regular backups of your notmuch database:
 
     $ rm notmuch-dump-b4chert
     $ rm -R notmuch-db-b4chert
@@ -80,7 +93,7 @@ This needs xapian 1.2
 Backup your database:
 
     $ cd
-    $ notmuch dump notmuch-dump-b4compact
+    $ notmuch dump --output=notmuch-dump-b4compact
 
 Compact it:
 
@@ -95,9 +108,8 @@ Remove old and renamed compacted, if compacting went well:
 
 ### More information about this in the email archives:
 
-* [id:xyz, Carl Worth](http://notmuchmail.org/pipermail/notmuch/2010/001105.html)
-
-* [id:xyz, Sebastian Spaeth](http://notmuchmail.org/pipermail/notmuch/2011/004048.html)
+* [Carl Worth](https://notmuchmail.org/pipermail/notmuch/2010/001105.html)
 
-* [id:xyz, Pieter Praet](http://notmuchmail.org/pipermail/notmuch/2011/004175.html)
+* [Sebastian Spaeth](https://notmuchmail.org/pipermail/notmuch/2011/004048.html)
 
+* [Pieter Praet](https://notmuchmail.org/pipermail/notmuch/2011/004175.html)