Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EB549B5D803 for ; Fri, 12 Aug 2011 14:15:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 66570-03 for ; Fri, 12 Aug 2011 17:15:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mail.postgresql.org (Postfix) with ESMTP id 934C1B5D91F for ; Fri, 12 Aug 2011 14:15:03 -0300 (ADT) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0ML7th-1QreCt06j3-000ND9; Fri, 12 Aug 2011 19:15:02 +0200 Message-ID: <4E455F95.7060805@2ndQuadrant.com> Date: Fri, 12 Aug 2011 13:15:01 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110702 Icedove/3.0.11 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Recommended optimisations slows down PostgreSQL 8.4 References: <4E447F0E.60208@2ndQuadrant.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:GWYmqwzDk1fgvFfIwP6+wiiZvLuDwNUDROqeNDHFo12 m6f9bJ2Bv9XyBx0c9Vp6cPcU3VszekFQtI8xH2BY2Pm+xreRuO yFCmHjrpmztjZTGbuM54CVQd7ikyCeWRuU+3UiaBDTj0ztMAQE BxlPHSU0QznNl/VX4fJNsFmVs/Fo3zfrt7sDRaRAaiDcO15nLa dY9VxTIqi7f7l+FhRHxmFIwVevKH2KZuySBs1Z/ivc= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201108/150 X-Sequence-Number: 44597 On 08/12/2011 12:28 PM, Waldo Nell wrote: > I guess that means the OS cache is better for this particular use case > than the postgresql cache? There you go. It's not magic; the database cache has some properties that work very well for some workloads. And for others, you might as well let the OS deal with it. The fact that you have the option of adjusting the proportions here is a controversial design point, but it does let you tune to your workload in this sort of case. > The fsync = off was because the production system runs on a uber expensive SAN system with multipathing over Fibre Channel, it is> on UPS and backup generators in a secure datacenter, and we have daily backups we can fall back to. The safer alternative is to turn synchronous_commit off and increase wal_writer_delay. That may not be quite as fast as turning fsync off, but the risk level is a lot lower too. The first time someone accidentally unplugs a part of your server, you'll realize that the UPS and generators don't really provide very much protection against the things that actually happen in a data center. Having backups is great, but needing to restore from them is no fun. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us