From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 13 Oct 2014 21:37:09 +0200 From: Steffen Nurpmeso To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20141013203709.9jz0HpWy%sdaoden@yandex.com> References: <3f0b54378d4d9670e206e0b6428ce886@ladd.quanstro.net> <20141013171051.28A35B827@mail.bitblocks.com> In-Reply-To: <20141013171051.28A35B827@mail.bitblocks.com> User-Agent: s-nail v14.7.8-11-g709152a MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_01413229029=-sPgVS-zOBn9-l3lxmiLgTxXnXx9T8M=_" Subject: Re: [9fans] Setting up Mail in Acme on the Raspberry Pi. Topicbox-Message-UUID: 1b1f13ee-ead9-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. --=_01413229029=-sPgVS-zOBn9-l3lxmiLgTxXnXx9T8M=_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Bakul Shah wrote: |On Mon, 13 Oct 2014 12:15:31 EDT erik quanstrom \ |wrote: |> On Sun Oct 12 14:37:47 EDT 2014, steve@quintile.net wrote: |>> I am fairly sure the problem is to do with RAM size rather than the ra= s=3D |> pberry pi per-se. |>> 4000 messages takes up a lot of space - and upas stores messages in RA= M=3D |> . |>=20 |> it's a little worse than this, actually. |> the solutions to this are straightforward |> (1) store one message per file, | |This is what MH (an old mail client) does by default. | |> (2) cache important data in an index to avoid opening all files, | |This is what dovecot (an imap/pop3 server) does. Jamie Zawinski implemented that for Netscape 2.0/3.0 [1] but still went for MBOX format. But of course that wasn't designed for Plan9 and permanent backup storage. The page says Right now I'm looking at a folder in 3.0. It has 15,466 messages in it. Selecting this folder takes less than a second (it's hard to eyeball it, but I'd say it takes about 1/2 to 3/4 second from when I click to when I see the message summary on the screen). The BSD mbox file is 57.2MB (1.2 million lines) and the summary file is 1.3MB (2% of the size of the folder.) This is on a P266 with a local IDE disk (Linux.) [1] --steffen --=_01413229029=-sPgVS-zOBn9-l3lxmiLgTxXnXx9T8M=_ Content-Type: message/rfc822 Content-Disposition: inline Content-Description: Attached message content Received: from mxfront1h.mail.yandex.net ([127.0.0.1]) by mxfront1h.mail.yandex.net with LMTP id C1TGX23U for ; Mon, 13 Oct 2014 21:12:01 +0400 Received: from mail.9fans.net (mail.9fans.net [67.207.142.3]) by mxfront1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPS id mceyX6VVla-C0NSJ8bF; Mon, 13 Oct 2014 21:12:00 +0400 (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client certificate not present) X-Yandex-Uniq: ab7987fa-b9a8-4d5a-a84c-fb8b733a14de Authentication-Results: mxfront1h.mail.yandex.net; spf=pass (mxfront1h.mail.yandex.net: domain of 9fans.net designates 67.207.142.3 as permitted sender) smtp.mail=9fans-bounces@9fans.net Received: from localhost ([127.0.0.1] helo=[67.207.142.3]) by mail.9fans.net with esmtp (Exim 4.71) (envelope-from <9fans-bounces@9fans.net>) id 1XdjBS-0002Cr-Py; Mon, 13 Oct 2014 17:13:22 +0000 Received: from mr005.lax02.mailroute.net ([199.89.1.8] helo=in-mr005.lax02.mailroute.net) by mail.9fans.net with esmtp (Exim 4.71) (envelope-from ) id 1XdjBQ-0002Cm-Pe for 9fans@9fans.net; Mon, 13 Oct 2014 17:13:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by in-mr005.lax02.mailroute.net (Postfix) with ESMTP id 3jGmcY6gpCz1T501 for <9fans@9fans.net>; Mon, 13 Oct 2014 17:10:53 +0000 (UTC) X-Virus-Scanned: by MailRoute X-X-Spam-Flag: NO X-X-Spam-Score: -0.011 X-X-Spam-Level: X-X-Spam-Status: No, score=-0.011 tagged_above=-9999 tests=[SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from in-mr005.lax02.mailroute.net ([199.89.1.8]) by localhost (mr005.lax02.mailroute.net [127.0.0.1]) (mroute_mailscanner, port 10024) with LMTP id HLHQ-iseu45b for <9fans@9fans.net>; Mon, 13 Oct 2014 17:10:53 +0000 (UTC) Received: from mail.bitblocks.com (ns1.bitblocks.com [173.228.5.8]) by in-mr005.lax02.mailroute.net (Postfix) with ESMTP id 3jGmcY0jjlz1T52d for <9fans@9fans.net>; Mon, 13 Oct 2014 17:10:52 +0000 (UTC) Received: from bitblocks.com (localhost [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 28A35B827 for <9fans@9fans.net>; Mon, 13 Oct 2014 10:10:51 -0700 (PDT) To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Mon, 13 Oct 2014 12:15:31 EDT." <3f0b54378d4d9670e206e0b6428ce886@ladd.quanstro.net> References: <3f0b54378d4d9670e206e0b6428ce886@ladd.quanstro.net> Comments: In-reply-to erik quanstrom message dated "Mon, 13 Oct 2014 12:15:31 -0400." Date: Mon, 13 Oct 2014 10:10:51 -0700 From: Bakul Shah Message-Id: <20141013171051.28A35B827@mail.bitblocks.com> Subject: Re: [9fans] Setting up Mail in Acme on the Raspberry Pi. X-BeenThere: 9fans@9fans.net X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.9fans.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces@9fans.net Errors-To: 9fans-bounces@9fans.net Return-Path: 9fans-bounces@9fans.net X-Yandex-Forward: 1431d05c8f532bcc8fea61a74badcb33 Status: R On Mon, 13 Oct 2014 12:15:31 EDT erik quanstrom wrote: > On Sun Oct 12 14:37:47 EDT 2014, steve@quintile.net wrote: > > I am fairly sure the problem is to do with RAM size rather than the ras= > pberry pi per-se. > > 4000 messages takes up a lot of space - and upas stores messages in RAM= > . > > it's a little worse than this, actually. > > since upas stores messages in mbox format, the whole file needs to be rea= > d or written on > update. certainly one could optimize the read bit, but that would be dif= > ficult this means > that the the whole mbox gets written to the dump every day, and you need = > about 2x the > mailbox size ram for each upas/fs that is run. this does not work out we= > ll for large mm > messages, or small ram boxes like the pi. > > the solutions to this are straightforward > (1) store one message per file, This is what MH (an old mail client) does by default. > (2) cache important data in an index to avoid opening all files, This is what dovecot (an imap/pop3 server) does. One other thing such mailservers do is to usually only *append* to an mbox file. Deleted messages are marked as such but their space is not reclaimed until you force a rebuild of the mbox file and its index. Pure imap clients typically only read last N messages from a given mailbox. More may be loaded as you scroll back. --=_01413229029=-sPgVS-zOBn9-l3lxmiLgTxXnXx9T8M=_--