unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2] new: Don't scan unchanged directories with no sub-directories
Date: Sat, 26 Oct 2013 08:52:55 -0300	[thread overview]
Message-ID: <87vc0ktfjc.fsf@zancas.localnet> (raw)
In-Reply-To: <878uxgvqh2.fsf@zancas.localnet>

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

David Bremner <david@tethera.net> writes:

> Austin Clements <amdragon@MIT.EDU> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: crunch.sh --]
[-- Type: text/x-sh, Size: 246 bytes --]

#!/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

[-- Attachment #3: drop-caches --]
[-- Type: application/octet-stream, Size: 112 bytes --]

sync
sync
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches

  reply	other threads:[~2013-10-26 11:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 20:33 [PATCH] new: Don't scan unchanged directories with no sub-directories Austin Clements
2013-10-24 21:08 ` Austin Clements
2013-10-24 21:38   ` [PATCH v2] " Austin Clements
2013-10-25 11:46     ` Tomi Ollila
2013-10-25 11:59       ` Vladimir Marek
2013-10-26  0:13     ` David Bremner
2013-10-26 11:52       ` David Bremner [this message]
2013-10-28 20:00     ` David Bremner
2013-10-28 20:46       ` Vladimir Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc0ktfjc.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=amdragon@MIT.EDU \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).