X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 71A1052834 for ; Mon, 6 Jun 2005 12:08:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03417-08 for ; Mon, 6 Jun 2005 15:08:30 +0000 (GMT) Received: from server07.icaen.uiowa.edu (server07.icaen.uiowa.edu [128.255.17.47]) by svr1.postgresql.org (Postfix) with ESMTP id AB6845289B for ; Mon, 6 Jun 2005 12:08:28 -0300 (ADT) Received: from server11.icaen.uiowa.edu (server11.icaen.uiowa.edu [128.255.17.51]) by server07.icaen.uiowa.edu (8.13.3/8.12.9) with ESMTP id j56F8Q7j015584; (envelope-from ) Mon, 6 Jun 2005 10:08:26 -0500 (CDT) Received: from [192.168.1.11] (12-215-118-172.client.mchsi.com [12.215.118.172]) (authenticated user=jfmeinel) by server11.icaen.uiowa.edu (8.13.2/smtp-serv-1.7) with ESMTP id j56F8OPG020849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256); (envelope-from ) Mon, 6 Jun 2005 10:08:25 -0500 (CDT) Message-ID: <42A466E7.4080808@arbash-meinel.com> Date: Mon, 06 Jun 2005 10:08:23 -0500 From: John A Meinel User-Agent: Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Casey Allen Shobe Cc: Postgresql Performance Subject: Re: Performance nightmare with dspam (urgent) (resolved) References: <200506012019.13218.cshobe@seattleserver.com> <200506061454.48018.lists@seattleserver.com> In-Reply-To: <200506061454.48018.lists@seattleserver.com> X-Enigmail-Version: 0.91.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6181E67B355E7A6657F58D55" X-Virus-Scanned: ClamAV version 0.83, clamav-milter version 0.83 on clamav.icaen.uiowa.edu X-Virus-Scanned: ClamAV version 0.83, clamav-milter version 0.83 on clamav.icaen.uiowa.edu X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/109 X-Sequence-Number: 12746 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6181E67B355E7A6657F58D55 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Casey Allen Shobe wrote: > On Wednesday 01 June 2005 20:19, Casey Allen Shobe wrote: > ... > Long-term, whenever we hit the I/O limit again, it looks like we really don't > have much of a solution except to throw more hardware (mainly lots of disks > in RAID0's) at the problem. :( Fortunately, with the above two changes I/O > usage on the PG data disk is a quarter of what it was, so theoretically we > should be able to quadruple the number of users on current hardware. > Be very careful in this situation. If any disks in a RAID0 fails, the entire raid is lost. You *really* want a RAID10. It takes more drives, but then if anything dies you don't lose everything. If you are running RAID0 and you *really* want performance, and aren't concerned about safety (at all), you could also set fsync=false. That should also speed things up. But you are really risking corruption/data loss on your system. > Our plan forward is to increase the number of disks in the two redundant mail > servers, so that each has a single ultra320 disk for O/S and pg_xlog, and a > 3-disk RAID0 for the data. This should triple our current capacity. I don't know if you can do it, but it would be nice to see this be 1 RAID1 for OS, 1 RAID10 for pg_xlog, and another RAID10 for data. That is the recommended performance layout. It takes quite a few drives (minimum of 10). But it means your data is safe, and your performance should be very good. > > The general opinion of the way dspam uses the database among people I've > talked to on #postgresql is not very good, but of course the dspam folk blame > PostgreSQL and say to use MySQL if you want reasonable performance. Makes it > real fun to be a DSpam+PostgreSQL user when limits are reached, since > everyone denies responsibility. Fortunately, PostgreSQL people are pretty > helpful even if they think the client software sucks. :) > I can't say how dspam uses the database. But they certainly could make assumptions about how certain actions are done by the db, which are not quite true with postgres. (For instance MySQL can use an index to return information, because Postgres supports transactions, it cannot, because even though a row is in the index, it may not be visible to the current transaction.) They also might be doing stuff like "select max(row)" instead of "select row ORDER BY row DESC LIMIT 1". In postgres the former will be a sequential scan, the latter will be an index scan. Though I wonder about "select max(row) ORDER BY row DESC LIMIT 1". to me, that should still return the right answer, but I'm not sure. > Cheers, Good luck, John =:-> --------------enig6181E67B355E7A6657F58D55 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFCpGbnJdeBCYSNAAMRAhGUAJwKCyIKAZKFRt5jci9MwqTotfynygCgym7j 047uL9GNdhNZqVg9RhkZRlA= =7/mu -----END PGP SIGNATURE----- --------------enig6181E67B355E7A6657F58D55--