From: David Bremner Date: Sat, 26 Oct 2013 11:52:55 +0000 (+2100) Subject: Re: [PATCH v2] new: Don't scan unchanged directories with no sub-directories X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=276a1ab7da710f82cab2fef73227ec0d4f7c85e6;p=notmuch-archives.git Re: [PATCH v2] new: Don't scan unchanged directories with no sub-directories --- diff --git a/26/22a2c1d724d668ff54076ceccddfd5e984c978 b/26/22a2c1d724d668ff54076ceccddfd5e984c978 new file mode 100644 index 000000000..d3c0d7950 --- /dev/null +++ b/26/22a2c1d724d668ff54076ceccddfd5e984c978 @@ -0,0 +1,115 @@ +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 59331431FC3 + for ; Sat, 26 Oct 2013 04:53:08 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +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 0bYgEviHdqwg for ; + Sat, 26 Oct 2013 04:53:03 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E6E4D431FB6 + for ; Sat, 26 Oct 2013 04:53:03 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1Va2QO-0003dQ-E0; Sat, 26 Oct 2013 08:53:00 -0300 +Received: (nullmailer pid 25778 invoked by uid 1000); Sat, 26 Oct 2013 + 11:52:55 -0000 +From: David Bremner +Newsgroups: +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] new: Don't scan unchanged directories with no + sub-directories +In-Reply-To: <878uxgvqh2.fsf@zancas.localnet> +References: <20131024210837.GH20337@mit.edu> + <1382650739-12438-1-git-send-email-amdragon@mit.edu> + <878uxgvqh2.fsf@zancas.localnet> +User-Agent: Notmuch/0.16+97~g6878b0b (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 26 Oct 2013 08:52:55 -0300 +Message-ID: <87vc0ktfjc.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" +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: Sat, 26 Oct 2013 11:53:08 -0000 + +--=-=-= +Content-Type: text/plain + +David Bremner writes: + +> Austin Clements writes: +> +>> This can substantially reduce the cost of notmuch new in some +>> situations, such as when the file system cache is cold or when the +>> Maildir is on NFS. +> +> On my desktop at home (a core i7 950) with spinning rust disks (and lvm +> on luks) this patch yields about a 7% slowdown in the intial new perf +> test +> +> from +> +> Wall(s) Usr(s) Sys(s) Res(K) In/Out(512B) +> Initial notmuch new 579.60 348.86 14.26 217188 5330266/3501272 +> +> to +> +> Wall(s) Usr(s) Sys(s) Res(K) In/Out(512B) +> Initial notmuch new 620.51 368.62 15.48 217156 5330354/3416456 +> +> On an SSD I don't detect a significant different (<0.5% speedup) + +Seems like a false alarm. Averaging over 10 repetitions, the patched +version is about 1% faster. Unfortunately it points out that our +performance test suite should really do more than one repetition for +each test. + + +--=-=-= +Content-Type: text/x-sh +Content-Disposition: inline; filename=crunch.sh + +#!/bin/bash + +test_description='notmuch new' + +. ./perf-test-lib.sh + +time_start +for i in $(seq 1 10); do + rm -rf ${MAIL_DIR}/.notmuch + sudo /home/bremner/config/scripts/drop-caches + time_run "notmuch new #$i" 'notmuch new' +done + +time_done + +--=-=-= +Content-Type: application/octet-stream +Content-Disposition: attachment; filename=drop-caches +Content-Transfer-Encoding: base64 + +c3luYwpzeW5jCmVjaG8gMSA+IC9wcm9jL3N5cy92bS9kcm9wX2NhY2hlcwplY2hvIDIgPiAvcHJv +Yy9zeXMvdm0vZHJvcF9jYWNoZXMKZWNobyAzID4gL3Byb2Mvc3lzL3ZtL2Ryb3BfY2FjaGVzCg== +--=-=-=--