Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9C6CD9FBEC3 for ; Thu, 21 Jun 2007 13:31:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 38111-04 for ; Thu, 21 Jun 2007 13:31:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sab-fillmore.sab.uiuc.edu (swan16.admin.uiuc.edu [128.174.254.16]) by postgresql.org (Postfix) with ESMTP id 852959FB651 for ; Thu, 21 Jun 2007 13:31:17 -0300 (ADT) Received: from SAB-DC1.sab.uiuc.edu ([128.174.254.32]) by sab-fillmore.sab.uiuc.edu with Microsoft SMTPSVC(6.0.3790.3959); Thu, 21 Jun 2007 11:32:22 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: Re: Volunteer to build a configuration tool Date: Thu, 21 Jun 2007 11:32:22 -0500 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PERFORM] Volunteer to build a configuration tool thread-index: Acez1Ewn7SDhE36rTQOTT+gzdXycrAATK68g References: <1182298719.4482.133.camel@ipso.snappymail.ca> <7621.1182318230@sss.pgh.pa.us> <9001.1182323187@sss.pgh.pa.us> From: "Campbell, Lance" To: "Greg Smith" , X-OriginalArrivalTime: 21 Jun 2007 16:32:22.0796 (UTC) FILETIME=[BE98E4C0:01C7B421] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.012 tagged_above=0 required=5 tests=AWL=0.011, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/473 X-Sequence-Number: 25506 Greg, I have a PostgreSQL database that runs on a dedicated server. The server has 24Gig of memory. What would be the max size I would ever want to set the shared_buffers to if I where to relying on the OS for disk caching approach? It seems that no matter how big your dedicated server is there would be a top limit to the size of shared_buffers. =20 Thanks, Lance Campbell Project Manager/Software Architect Web Services at Public Affairs University of Illinois 217.333.0382 http://webservices.uiuc.edu =20 -----Original Message----- From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Greg Smith Sent: Thursday, June 21, 2007 2:15 AM To: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Volunteer to build a configuration tool On Wed, 20 Jun 2007, Campbell, Lance wrote: > If everything I said is correct then I agree "Why have=20 > effective_cache_size?" Why not just go down the approach that Oracle=20 > has taken and require people to rely more on shared_buffers and the=20 > general memory driven approach? Why rely on the disk caching of the OS? First off, it may help explain the dynamics here if you know that until=20 fairly recent releases, the PostgreSQL shared_buffers cache had some=20 performance issues that made it impractical to make it too large. It=20 hasn't been that long that relying more heavily on the Postgres cache was=20 technically feasible. I think the user community at large is still=20 assimilating all the implications of that shift, and as such some of the territory with making the Postgres memory really large is still being=20 mapped out. There are also still some issues left in that area. For example, the=20 bigger your shared_buffers cache is, the worse the potential is for having=20 a checkpoint take a really long time and disrupt operations. There are OS=20 tunables that can help work around that issue; similar ones for the=20 PostgreSQL buffer cache won't be available until the 8.3 release. In addition to all that, there are still several reasons to keep relying on the OS cache: 1) The OS cache memory is shared with other applications, so relying on it=20 lowers the average memory footprint of PostgreSQL. The database doesn't have to be a pig that constantly eats all the memory up, while still=20 utilizing it when necessary. 2) The OS knows a lot more about the disk layout and similar low-level=20 details and can do optimizations a platform-independant program like=20 Postgres can't assume are available. 3) There are more people working on optimizing the caching algorithms in modern operating systems than are coding on this project. Using that=20 sophisticated cache leverages their work. "The Oracle Way" presumes that you've got such a massive development staff=20 that you can solve these problems better yourself than the community at=20 large, and then support that solution on every platform. This is why they=20 ended up with solutions like raw partitions, where they just put their own=20 filesystem on the disk and figure out how to make that work well=20 everywhere. If you look at trends in this area, at this point the=20 underlying operating systems have gotten good enough that tricks like that=20 are becoming marginal. Pushing more work toward the OS is a completely=20 viable design choice that strengthens every year. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend