"snoozing" with notmuch?
[notmuch-archives.git] / 84 / 85b6d99d7384ef851c0b6406f85112efeb7d47
1 Return-Path: <bremner@unb.ca>\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 408F7431FD0\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 10:34:15 -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: -2.29\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 tXInEw0d6fjY for <notmuch@notmuchmail.org>;\r
16         Sun, 18 Dec 2011 10:34:14 -0800 (PST)\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 99129431FB6\r
21         for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 10:34:14 -0800 (PST)\r
22 Received: from zancas.localnet\r
23         (fctnnbsc36w-156034079193.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
24         [156.34.79.193]) (authenticated bits=0)\r
25         by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pBIIYALd013972\r
26         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
27         Sun, 18 Dec 2011 14:34:10 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.77)\r
29         (envelope-from <bremner@unb.ca>)\r
30         id 1RcLYn-00080s-Jj; Sun, 18 Dec 2011 14:34:09 -0400\r
31 From: David Bremner <bremner@debian.org>\r
32 To: Austin Clements <amdragon@MIT.EDU>\r
33 Subject: Re: More ideas about logging.\r
34 In-Reply-To: <20111216040722.GC12245@mit.edu>\r
35 References: <87obv9i7y3.fsf@zancas.localnet> <20111216040722.GC12245@mit.edu>\r
36 User-Agent: Notmuch/0.10.2+103~gd823dc2 (http://notmuchmail.org) Emacs/23.3.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Sun, 18 Dec 2011 14:34:00 -0400\r
39 Message-ID: <87hb0xbug7.fsf@zancas.localnet>\r
40 MIME-Version: 1.0\r
41 Content-Type: multipart/signed; boundary="=-=-=";\r
42         micalg=pgp-sha1; protocol="application/pgp-signature"\r
43 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Sun, 18 Dec 2011 18:34:15 -0000\r
57 \r
58 --=-=-=\r
59 Content-Transfer-Encoding: quoted-printable\r
60 \r
61 On Thu, 15 Dec 2011 23:07:22 -0500, Austin Clements <amdragon@MIT.EDU> wrot=\r
62 e:\r
63 > Quoth David Bremner on Dec 15 at 10:09 pm:\r
64 >=20\r
65 > The trouble with this approach is that the OS doesn't have to flush\r
66 > logfile to the disk platters in any particular order relative to the\r
67 > updates to Xapian.  So, after someone trips over your plug, you could\r
68 > come back with Xapian saying you have 500 log entries when your\r
69 > logfile comes back with only 20.  The only way I know of to fix this\r
70 > is to fsync after the logfile write, which would obviously have\r
71 > performance issues.  But maybe there are cleverer ways?\r
72 \r
73 What about just declaring the log invalid in this case and forcing a\r
74 "slow-sync"? It seems it should be no harder to detect the log being\r
75 behind xapian than it would be to detect it being ahead.\r
76 \r
77 Another idea would be to replace logging with mkdir(2) and creat(2); I\r
78 made some experiments in branch 'tree-dump' in repo\r
79 =20=20=20=20=20\r
80      git://pivot.cs.unb.ca/notmuch\r
81 \r
82 This generates a tree of empty files in the style of nmbug (which an\r
83 extra layer of directories at the to help prevent file system\r
84 explosion).\r
85 \r
86 It isn't super fast as a way to dump (probably at least 10x slower than\r
87 the file based methods). On the other hand, on this machine (an i7 950\r
88 with a spinning disk) it takes about 1 ms per tag to write (i.e. 175k\r
89 tags take about 160s). It is completely IO bound, so I would expect it\r
90 be faster on SSD.  I am running lvm on top of dm-crypt.\r
91 \r
92 The more worrying part is disk usage; the tag tree for 200k messages\r
93 uses 400k inodes, and 836M of apparent disk usage (according to du) the\r
94 same tags in "sup" format take 11M.  Maybe this could be usefull if\r
95 combined with some scheme to only dump tags not covered by maildir (for\r
96 those using maildir flag synching already)\r
97 \r
98 d\r
99 \r
100 \r
101 \r
102 \r
103 --=-=-=\r
104 Content-Type: application/pgp-signature\r
105 \r
106 -----BEGIN PGP SIGNATURE-----\r
107 Version: GnuPG v1.4.11 (GNU/Linux)\r
108 \r
109 iJwEAQECAAYFAk7uMhgACgkQTiiN/0Um85kVPwP/XSPeyr5gTeNrKlSiFyTyxPAm\r
110 tfYmEwNjsp7U+LhGiM/fjZZsM0QVoUOG1Z+M2Pxk0XKThsfSt6yckWevgil7nUoD\r
111 ZVOQ0Uea47+28Y4biBWSxAhcqQRa6ZsEDDDbfdhrh+xeOT2OHl6GVC1glQTzkOzP\r
112 5Xk44VpXlGsxRnMYW9E=\r
113 =7SuZ\r
114 -----END PGP SIGNATURE-----\r
115 --=-=-=--\r