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 E810C431FBC for ; Thu, 14 Jan 2010 15:16:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.198 X-Spam-Level: X-Spam-Status: No, score=-2.198 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.342, BAYES_20=-0.74] 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 zilSrVTyYztG; Thu, 14 Jan 2010 15:16:25 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C5D62431FAE; Thu, 14 Jan 2010 15:16:25 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 2241C550090; Thu, 14 Jan 2010 15:16:25 -0800 (PST) From: Carl Worth To: Oliver Charles , notmuch@notmuchmail.org In-Reply-To: <5641883d1001140730l22832715ld6bdc95c9938d314@mail.gmail.com> References: <5641883d1001140730l22832715ld6bdc95c9938d314@mail.gmail.com> Date: Thu, 14 Jan 2010 15:16:24 -0800 Message-ID: <87d41ce0qf.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: [notmuch] Notmuch performance problems on OSX 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: Thu, 14 Jan 2010 23:16:27 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable Hi Oliver, welcome to notmuch! On Thu, 14 Jan 2010 15:30:48 +0000, Oliver Charles wrote: > I've installed the latest notmuch from Git at this time of writing, > along with Xapian from SVN head. However, just tagging a single thread > with only one message seems to take too long: >=20 > $ time notmuch tag +dissertation thread:7dc536441e6deade4256a46d46451221 >=20 > real 0m0.812s > user 0m0.022s > sys 0m0.037s Things work quite a bit faster than that on my machine: $ time notmuch tag +foo id:5641883d1001140730l22832715ld6bdc95c9938d314@mai= l.gmail.com real 0m0.024s user 0m0.012s sys 0m0.004s But that could just be system differences. > And tagging all my messages is really horrible: >=20 > $ time notmuch tag +foobar tag:inbox >=20 > real 0m5.076s > user 0m3.688s > sys 0m0.105s For this operation, I can't really compare. How many messages are you tagging? Here's that operation for me with 525 messages in my inbox: $ time notmuch tag +foobar tag:inbox real 0m1.551s user 0m1.504s sys 0m0.016s > That xapian-svn was built from svn HEAD right now, so I'm assuming it > contains the #250 fix (http://trac.xapian.org/changeset/13808) Which I think means that things could have been even *much* slower before. ;-) The Xapian defect #250 was just one, initial (and obvious) performance problem. [Though, as I mentioned in a previous thread, if you're using a Xapian flint database, (look for .notmuch/xapian/iamflint), then you won't get the benefit of the Xapian fix until you rebuild your notmuch database from scratch with a current notmuch.] Once you've verified that you've got the #250 fix functional, there could still be lots of performance bugs. And it would be time to start profiling. Perhaps the "notmuch daemon" idea (which we've proposed earlier for other reasons) could help reduce overhead from reading the database and writing it back out again. So that might be one avenue to explore for fixing things. I have no idea what OS X does, but Linux keeps my notmuch database in its buffer cache so I can do these operations without even touching "disk" (which is actually an SSD anyway, which also helps). I just tried, and was able to get the single-message tag operation to be 3 times slower by dropping the cache: $ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches " $ time notmuch tag +foo id:5641883d1001140730l22832715ld6bdc95c9938d314@mai= l.gmail.com real 0m0.062s user 0m0.000s sys 0m0.020s But again, whatever the performance problem might be, the first step would be to examine some profiles. (And I'm clueless, myself as to what profiling tools might be available for OS X.) =2DCarl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLT6XI6JDdNq8qSWgRAvqAAJ9YBzxsYXYrJ6qcg52b+Loik5Up+ACfbgjd G7XrYeT28dru4gDwi5DP6eU= =Rico -----END PGP SIGNATURE----- --=-=-=--