Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / ba / cf53d76ccafc0d5a6fcab77540a0334bb4d574
1 Return-Path: <thomas@schwinge.name>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 1FDA8429E21\r
6         for <notmuch@notmuchmail.org>; Mon, 28 Nov 2011 13:04:30 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id HfyYiCJX08OE for <notmuch@notmuchmail.org>;\r
16         Mon, 28 Nov 2011 13:04:29 -0800 (PST)\r
17 Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de\r
18         [80.67.31.25])\r
19         by olra.theworths.org (Postfix) with ESMTP id 01A85431FB6\r
20         for <notmuch@notmuchmail.org>; Mon, 28 Nov 2011 13:04:28 -0800 (PST)\r
21 Received: from [87.180.30.217] (helo=stokes.schwinge.homeip.net)\r
22         by smtprelay02.ispgateway.de with esmtpa (Exim 4.68)\r
23         (envelope-from <thomas@schwinge.name>) id 1RV8NH-0006DS-Nw\r
24         for notmuch@notmuchmail.org; Mon, 28 Nov 2011 22:04:27 +0100\r
25 Received: (qmail 3559 invoked from network); 28 Nov 2011 21:04:17 -0000\r
26 Received: from boole.schwinge.homeip.net (192.168.111.208)\r
27         by stokes.schwinge.homeip.net with QMQP; 28 Nov 2011 21:04:17 -0000\r
28 Received: (nullmailer pid 7842 invoked by uid 1000);\r
29         Mon, 28 Nov 2011 21:04:17 -0000\r
30 From: Thomas Schwinge <thomas@schwinge.name>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: Re: [PATCH] dump: Don't sort.\r
33 In-Reply-To: <2flr514171q.fsf@login1.uio.no>\r
34 References: <1319884657-5574-1-git-send-email-thomas@schwinge.name>\r
35         <2flr514171q.fsf@login1.uio.no>\r
36 User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Mon, 28 Nov 2011 22:04:14 +0100\r
39 Message-ID: <87hb1ormb5.fsf@boole.schwinge.homeip.net>\r
40 MIME-Version: 1.0\r
41 Content-Type: multipart/signed; boundary="=-=-=";\r
42         micalg=pgp-sha1; protocol="application/pgp-signature"\r
43 X-Df-Sender: dGhvbWFzQHNjaHdpbmdlLm5hbWU=\r
44 Cc: Petter Reinholdtsen <pere@hungry.com>\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Mon, 28 Nov 2011 21:04:30 -0000\r
58 \r
59 --=-=-=\r
60 Content-Type: text/plain; charset=utf-8\r
61 Content-Transfer-Encoding: quoted-printable\r
62 \r
63 Hi!\r
64 \r
65 First, thanks to David, Tomi, Tom for moving this forward.\r
66 \r
67 \r
68 On Sat, 19 Nov 2011 16:11:13 +0100, Petter Reinholdtsen <pere@hungry.com> w=\r
69 rote:\r
70 > [Thomas Schwinge]\r
71 > > +    /* This used to use NOTMUCH_SORT_MESSAGE_ID.  On 2011-10-29, a mea=\r
72 surement\r
73 > > +     * on a 372981 messages instance showed that wall time can be redu=\r
74 ced from\r
75 > > +     * 28 minutes (sorted by Message-ID) to 15 minutes (unsorted), the=\r
76  latter\r
77 > > +     * being much more ``database-disk-layout-friendly''.  Subsequentl=\r
78 y sorting\r
79 > > +     * the 25 MiB of data is a no-brainer, if required.  */\r
80 \r
81 Here is the measurement re-done -- I discovered that while doing the\r
82 former, there had been parallel work been done in another Xen domU on\r
83 that system, disturbing the measurement.\r
84 \r
85 Discard caches, every time before dumping:\r
86 \r
87     $ sync; sleep 3; echo -n 3 | sudo dd of=3D/proc/sys/vm/drop_caches\r
88 \r
89 Original (sorted by Message-ID):\r
90 \r
91     $ \time notmuch dump > ~/tmp/Mail-notmuch_dump/dump\r
92     26.41user 16.56system 14:34.81elapsed 4%CPU (0avgtext+0avgdata 167152ma=\r
93 xresident)k\r
94     2994440inputs+55896outputs (41major+11627minor)pagefaults 0swaps\r
95 \r
96 Unsorted:\r
97 \r
98     $ \time notmuch dump | sort > ~/tmp/Mail-notmuch_dump/dump\r
99     24.79user 3.86system 12:00.22elapsed 3%CPU (0avgtext+0avgdata 57216maxr=\r
100 esident)k\r
101     2929192inputs+0outputs (40major+4942minor)pagefaults 0swaps\r
102 \r
103 The difference is no longer as big as before, but still better than\r
104 nothing.\r
105 \r
106 > This sound like a great idea for my use case.  Doing 'notmuch dump'\r
107 > with my 1.2 million emails take hours at the moment (not very fast\r
108 > encrypted file system), and result in a 90 MiB dump file.\r
109 \r
110 ... and you will gain most by putting the .notmuch directory onto a SSD,\r
111 as I have done by now:\r
112 \r
113 Original (sorted by Message-ID), with .notmuch on SSD:\r
114 \r
115     $ \time notmuch dump > ~/tmp/Mail-notmuch_dump/dump\r
116     24.86user 13.40system 1:06.01elapsed 57%CPU (0avgtext+0avgdata 167200ma=\r
117 xresident)k\r
118     2992184inputs+55920outputs (49major+11622minor)pagefaults 0swaps\r
119 \r
120 Unsorted, with .notmuch on SSD:\r
121 \r
122     $ \time notmuch dump > ~/tmp/Mail-notmuch_dump/dump\r
123     21.90user 2.68system 0:51.70elapsed 47%CPU (0avgtext+0avgdata 57248maxr=\r
124 esident)k\r
125     2926912inputs+55920outputs (50major+4934minor)pagefaults 0swaps\r
126 \r
127 User and system time (roughly) remain the same, but the wall time drops\r
128 considerably -- a SSD at its best, obviously.\r
129 \r
130 \r
131 Generally speaking, I decided it was enough to just put the .notmuch\r
132 directory onto the SSD, and not the whole mail store: if new messages are\r
133 added (notmuch new), they're still in the page cache anyway (having been\r
134 retrieven via POP3 or whatever just before), and for regular message read\r
135 access, a HDD's seek time shouldn't matter too much (and I've taken\r
136 notice of Austin's patches which even retrieven Subject: etc. from the\r
137 DB), so what remains to be optimized is random access to the DB.\r
138 \r
139 \r
140 Gr=C3=BC=C3=9Fe,\r
141  Thomas\r
142 \r
143 --=-=-=\r
144 Content-Type: application/pgp-signature\r
145 \r
146 -----BEGIN PGP SIGNATURE-----\r
147 Version: GnuPG v1.4.11 (GNU/Linux)\r
148 \r
149 iQEcBAEBAgAGBQJO0/dPAAoJEGe3hdm9kOiimzQH/joxsLmsJ5vpFZPVjzHC0geP\r
150 JTVrHA2OBlch591kL1UfLeyK6XAMokcx5+UC6oeV6cQkdoOn3gHwt1C5A3qzCyRg\r
151 UgYfWMavHuUHoXbV/+rO5PU9p+6+w3ij0XR/E8zSSzP3BQgOH9XPF0roexBCkBN5\r
152 JwoLhnFbQeotgSPBwbcs+XxgSeGk6gMKOV0rCC1vEJdWcxFpBtrE7MVJo/A3syLI\r
153 j6uPjJObbPk1DTo2UOUcU1Mb7gdwIlrJdvu4O1y5qiFsdxF3ZtQEJrt1OB9eo4TJ\r
154 e5Rhm6xI2iaexVGR6lNdLhsBiuQlWG1ADjCdABCVJCYA8Yf8pynmP365Eu1Ovs4=\r
155 =VBNs\r
156 -----END PGP SIGNATURE-----\r
157 --=-=-=--\r