Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 7F6ED9FB2D1 for ; Mon, 30 Apr 2007 08:48:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 46548-07 for ; Mon, 30 Apr 2007 08:48:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id 580259FB279 for ; Mon, 30 Apr 2007 08:48:25 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id l3UBmOn9023023 for ; Mon, 30 Apr 2007 07:48:24 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id l3UBmOdR023020 for ; Mon, 30 Apr 2007 07:48:24 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Mon, 30 Apr 2007 07:48:24 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: pgsql-performance@postgresql.org Subject: Re: Feature Request --- was: PostgreSQL Performance Tuning In-Reply-To: <200704271059.50265.josh@agliodbs.com> Message-ID: References: <20070427143023.GA2422@mathom.us> <46323744.5020703@drivefaster.net> <200704271059.50265.josh@agliodbs.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/498 X-Sequence-Number: 24375 On Fri, 27 Apr 2007, Josh Berkus wrote: > *Everyone* wants this. The problem is that it's very hard code to write > given the number of variables There's lots of variables, and there are at least three major ways to work on improving someone's system: 1) Collect up data about their system (memory, disk layout), find out a bit about their apps/workload, and generate a config file based on that. 2) Connect to the database and look around. Study the tables and some their stats, make some estimates based on what your find, produce a new config file. 3) Monitor the database while it's doing its thing. See which parts go well and which go badly by viewing database statistics like pg_statio. From that, figure out where the bottlenecks are likely to be and push more resources toward them. What I've been working on lately is exposing more readouts of performance-related database internals to make this more practical. When first exposed to this problem, most people assume that (1) is good enough--ask some questions, look at the machine, and magically a reasonable starting configuration can be produced. It's already been pointed out that anyone with enough knowledge to do all that can probably spit out a reasonable guess for the config file without help. If you're going to the trouble of building a tool for offering configuration advice, it can be widly more effective if you look inside the database after it's got data in it, and preferably after it's been running under load for a while, and make your recommendations based on all that information. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD