X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D26D7DBA92 for ; Wed, 23 Nov 2005 18:00:42 -0400 (AST) 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 80479-03 for ; Wed, 23 Nov 2005 22:00:44 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from unicorn.rentec.com (unicorn.rentec.com [216.223.240.9]) by svr1.postgresql.org (Postfix) with ESMTP id 268D9DBA4E for ; Wed, 23 Nov 2005 18:00:39 -0400 (AST) Received: from wren.rentec.com (wren.rentec.com [192.5.35.106]) by unicorn.rentec.com (8.13.1/8.12.1) with ESMTP id jANM0T2v021183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Nov 2005 17:00:30 -0500 (EST) X-Source: non-mednet Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by wren.rentec.com (8.13.1/8.12.1) with ESMTP id jANM0ZvF014858; Wed, 23 Nov 2005 17:00:35 -0500 (EST) Message-ID: <4384E685.4060108@rentec.com> Date: Wed, 23 Nov 2005 17:00:37 -0500 From: Alan Stange Reply-To: stange@rentec.com Organization: Renaissance Technologies Corp. User-Agent: Thunderbird 1.5 (X11/20051025) MIME-Version: 1.0 To: Luke Lonergan CC: Postgresql Performance Subject: Re: Hardware/OS recommendations for large databases ( References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Logged: Logged by unicorn.rentec.com as jANM0T2v021183 at Wed Nov 23 17:00:30 2005 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.007 required=5 tests=[AWL=0.007] X-Spam-Score: 0.007 X-Spam-Level: X-Archive-Number: 200511/475 X-Sequence-Number: 15732 Luke Lonergan wrote: > Why not contribute something - put up proof of your stated 8KB versus > 32KB page size improvement. I did observe that 32KB block sizes were a significant win "for our usage patterns". It might be a win for any of the following reasons: 0) The preliminaries: ~300GB database with about ~50GB daily turnover. Our data is fairly reasonably grouped. If we're getting one item on a page we're usually looking at the other items as well. 1) we can live with a smaller FSM size. We were often leaking pages with a 10M page FSM setting. With 32K pages, a 10M FSM size is sufficient. Yes, the solution to this is "run vacuum more often", but when the vacuum was taking 10 hours at a time, that was hard to do. 2) The typical datum size in our largest table is about 2.8KB, which is more than 1/4 page size thus resulting in the use of a toast table. Switching to 32KB pages allows us to get a decent storage of this data into the main tables, thus avoiding another table and associated large index. Not having the extra index in memory for a table with 90M rows is probably beneficial. 3) vacuum time has been substantially reduced. Vacuum analyze now run in the 2 to 3 hour range depending on load. 4) less cpu time spent in the kernel. We're basically doing 1/4 as many system calls. Overall the system has now been working well. We used to see the database being a bottleneck at times, but now it's keeping up nicely. Hope this helps. Happy Thanksgiving! -- Alan