Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A5A969FA131 for ; Thu, 4 Jan 2007 23:42:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 93401-07 for ; Thu, 4 Jan 2007 23:42:07 -0400 (AST) X-Greylist: delayed 00:29:35.587218 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 2D1309FA0B7 for ; Thu, 4 Jan 2007 23:42:14 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from p0f.net (p0f.net [193.77.154.190]) by svr4.postgresql.org (Postfix) with ESMTP id 1D08B5AF03D for ; Fri, 5 Jan 2007 03:12:35 +0000 (GMT) Received: from [195.210.218.204] (BSN-210-218-204.dial-up.dsl.siol.net [195.210.218.204]) (authenticated bits=0) by p0f.net (8.13.8/8.13.8) with ESMTP id l0523FGX028227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Jan 2007 03:03:23 +0100 Message-ID: <459DC19C.20100@p0f.net> Date: Fri, 05 Jan 2007 04:10:20 +0100 From: Grega Bremec Organization: P0F User-Agent: Thunderbird 1.5.0.9 (X11/20060911) MIME-Version: 1.0 To: "Charles A. Landemaine" Cc: pgsql-performance@postgresql.org Subject: Re: PostgreSQL to host e-mail? References: In-Reply-To: X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (p0f.net [192.168.50.7]); Fri, 05 Jan 2007 03:03:26 +0100 (CET) X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on odie.p0f.net X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.143 tagged_above=0 required=5 tests=BAYES_50, SPF_FAIL X-Spam-Level: * X-Archive-Number: 200701/67 X-Sequence-Number: 22668 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Charles A. Landemaine wrote: | I'm building an e-mail service that has two requirements: It should | index messages on the fly to have lightening search results, and it | should be able to handle large amounts of space. The server is going | to be dedicated only for e-mail with 250GB of storage in Raid-5. I'd | like to know how PostgreSQL could handle such a large amount of data. | How much RAM would I need? I expect my users to have a 10GB quota per | e-mail account. | Thanks for your advice, | Hello, Charles. I'll second people's suggestions to stay away from RAID5; the kind of workload a mail storage will have is one that is approximately an even mix of writes (in database terms, INSERTs, UPDATEs and DELETEs) and reads, and we all know RAID5 is a loser when it comes to writing a lot, at least when you're building arrays with less than 10-15 drives. I'd suggest you go for RAID10 for the database cluster and an extra drive for WAL. Another point of interest I'd like to mention is one particular aspect of the workflow of an e-mail user: we will typically touch the main inbox a lot and leave most of the other folders pretty much intact for most of the time. This suggests per-inbox quota might be useful, maybe in addition to the overall quota, because then you can calculate your database working set more easily, based on usage statistics for a typical account. Namely, if the maximum size of an inbox is x MB, with y% average utilization, and you plan for z users, of which w% will be typically active in one day, your database working set will be somewhere in the general area of (x * y%) * (z * w%) MB. Add to that the size of the indexes you create, and you have a very approximate idea of the amount of RAM you need to place in your machines to keep your performance from becoming I/O-bound. The main reason I'm writing this mail though, is to suggest you take a look at Oryx, http://www.oryx.com/; They used to have this product called Mailstore, which was designed to be a mail store using PostgreSQL as a backend, and has since evolved to a bit more than just that, it seems. Perhaps it could be of help to you while building your system, and I'm sure the people at Oryx will be glad to hear from you while, and after you've built your system. Kind regards, - -- ~ Grega Bremec ~ gregab at p0f dot net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFFncGcfu4IwuB3+XoRA9Y9AJ0WA+0aooVvGMOpQXGStzkRNVDCjwCeNdfs CArTFwo6geR1oRBFDzFRY/U= =Y1Lf -----END PGP SIGNATURE-----