Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKE3F-000600-9l for pgsql-performance@arkaria.postgresql.org; Mon, 25 Mar 2013 20:31:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UKE3E-0001kj-Qk for pgsql-performance@arkaria.postgresql.org; Mon, 25 Mar 2013 20:31:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKE3D-0001ke-R5 for pgsql-performance@postgresql.org; Mon, 25 Mar 2013 20:31:27 +0000 Received: from outmail148134.authsmtp.com ([62.13.148.134]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKE3A-000100-4R for pgsql-performance@postgresql.org; Mon, 25 Mar 2013 20:31:27 +0000 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt7.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id r2PKVNZa018529 for ; Mon, 25 Mar 2013 20:31:23 GMT Received: from [172.47.23.103] (70-36-143-10.dsl.dynamic.sonic.net [70.36.143.10]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r2PKVI1I005338 for ; Mon, 25 Mar 2013 20:31:19 GMT Message-ID: <5150B415.9060907@agliodbs.com> Date: Mon, 25 Mar 2013 13:31:17 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: postgres performance list Subject: Setting vacuum_freeze_min_age really low X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: f39234e4-958a-11e2-b5c5-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkbIhBDJB8RWB5f NVxfJ1xYPXUEQkpF VCReGBUITgIzDi13 bhUsPEdCYEpPXBVo UEJKQ1hTHUtvAQIC AAAfVhpsdgVZen1v ZQggXBAgOj17DEZ9 R01XHSMHYG9kJjYc WUJbc1ZQbQpPdk5Y a1EqVm5fZDYCe3pg RVJiZzloYDlWdzJu Tx0RLFQdCVgCFSMh QicMBzgiD0AyQiQ1 GBUpJxYGEU8VNlR6 NVw+MQAA X-Authentic-SMTP: 61633136333939.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 70.36.143.10/23 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Folks, In the past, setting vacuum_freeze_min_age (vfma) really low (say to 10000 or 50000) would have caused lots of extra writing work due to dirtying extra pages for freezing. This has been our stated reason to keep vfma high, despite the obvious advantage of freezing tuples while they're still in the cache. With the visibility map, though, vfma should only be dirtying pages which vacuum is already visiting because there's dirty tuples on the page. That is, pages which vacuum will probably dirty anyway, freezing or not. (This is assuming one has applied the 9.2.3 update.) Given that, it seems like the cost of lowering vfma *should* be marginal. The only extra work done by a lower vfma should be: 1. extra cpu time to put in the froxenXIDs on vacuumed pages, and 2. dirtying the minority of pages which vacuum decided to scan, but not write to. The second point is the one where I'm not sure how to evaluate. How likely, as of 9.2, is vacuum to visit a page and not dirty it? And are there other costs I'm not thinking of? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance