Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A07244048EF for ; Sun, 14 Mar 2010 22:59:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.881 X-Spam-Level: X-Spam-Status: No, score=-0.881 tagged_above=-999 required=5 tests=[AWL=-0.882, BAYES_50=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R36+DTj495eT for ; Sun, 14 Mar 2010 22:59:30 -0700 (PDT) Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.148]) by olra.theworths.org (Postfix) with ESMTP id 041CB454968 for ; Sun, 14 Mar 2010 22:59:29 -0700 (PDT) Received: by qw-out-1920.google.com with SMTP id 4so757126qwk.32 for ; Sun, 14 Mar 2010 22:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject; bh=prHAPOOpKREKAyC7/92SjC6QlCe+bv4/oQCGNl6/Hzk=; b=LIkqMS+r9kTnnMN4oQZtpqgQ5EHbbUUV4KSAVRz6pSXDuaRJ0ykG78ykS0N0uWb++q +jYtMs6mJ8yiplGNFzbooyOvO5SHlW/4BfSrZ4RXpKBIqZNOZ55ThFHpPl1EN2b/3mrC s8Nauzcsur57W6V/2elWPZFysLss1h0Vj3ThA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject; b=gpNeFxfwocch4nPkGYHVVqKwcFjeZvXgc0B8SavfO9S/+s5lat/B2K3gzlu2I7dd3O VxBDisAr/UVu3Ou3saQEZm2df5ZAnEGMAIrRAKPvPpzDTWpEflbOJz46cs1t2BKfLpjo h77eTW0hNi5DPhnXfbzaoSGGjgO/VBZSUz3Rw= Received: by 10.224.87.19 with SMTP id u19mr120250qal.8.1268632769389; Sun, 14 Mar 2010 22:59:29 -0700 (PDT) Received: from localhost (pool-96-236-119-34.spfdma.east.verizon.net [96.236.119.34]) by mx.google.com with ESMTPS id 6sm9352926qwd.54.2010.03.14.22.59.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Mar 2010 22:59:28 -0700 (PDT) Message-ID: <4b9dccc0.c6c1f10a.3671.44ec@mx.google.com> Date: Sun, 14 Mar 2010 22:59:28 -0700 (PDT) From: Ben Gamari To: notmuch Subject: [notmuch] Notmuch performance (literally, in my case) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 05:59:32 -0000 Out of curiosity: How does notmuch perform for you? I just started using it on a daily basis last week. I love the power that notmuch provides and the emacs interface is surprisingly usable after you've gotten used to it, but that being said, I've been quite surprised by how poorly the kernel responds to the workload presented by notmuch. Database updates in particular are awful; notmuch new will easily take 3 minutes to index 10 messages and for much of that time the machine will be close to unusable: input device events are handled sporatically, music will studder, applications will go unresponsive for tens of seconds at a time; the traits usually associated with pagefile thrashing. Even something as simple as saving a file or starting a terminal can take tens of seconds. Considering I have notmuch new run in my crontab, this gets old quite quickly. It's really quite awful. As far as I can tell, this is a result of the horrendous behavior fsync() invokes in the kernel. I find that performance also suffers in similar ways when doing backups with rsync, which also seems to use fsync(). During these slow periods, I/O wait time dominates top while disk throughput hovers at less than 1MByte/second. I have 4GB of memory and a fairly fast hard drive (for a laptop), yet somehow the system is still barely usable. Meanwhile, latencytop shows large amounts of time (sometimes 30 seconds or more) spent handling page faults. Has anyone else observed similarly poor behavior? I am currently using btrfs on this machine, although ext4 doesn't seem to be any better. Notmuch is using xapian 1.08-1.99karmic from the Xapian backports PPA, which I believe includes the recent database update optimizations. I would really like to get to the bottom of this behavior. There have been many attempts[1-8] in the past, but to this day the kernel still seems to suffer under these sorts of workloads. Anyways just wondering if you all are seeing similar issues. I've never had so reliable a means of reproducing these latencies, but I think I might bring the issue to the LKML again if I get some responses. Any feedback in either direction would be greatly appreciated. Thanks! - Ben [1] http://bugzilla.kernel.org/show_bug.cgi?id=5900 [2] http://bugzilla.kernel.org/show_bug.cgi?id=7372 [3] http://lkml.org/lkml/2009/5/16/225 [4] http://lkml.org/lkml/2009/4/28/24 [5] http://lkml.org/lkml/2007/7/21/219 [6] http://lkml.org/lkml/2009/3/26/72 [7] http://lwn.net/Articles/328363/ [8] http://lkml.org/lkml/2009/4/6/114