Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 350789FC25C for ; Fri, 15 Jun 2007 14:29:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 72661-08 for ; Fri, 15 Jun 2007 14:29:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id A71F49FBFDD for ; Fri, 15 Jun 2007 14:29:35 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id l5FHTaJR009346 for ; Fri, 15 Jun 2007 13:29:36 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id l5FHTaMg009343 for ; Fri, 15 Jun 2007 13:29:36 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Fri, 15 Jun 2007 13:29:36 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: pgsql-hackers@postgresql.org Subject: Re: Performance Monitoring In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/645 X-Sequence-Number: 104434 On Fri, 15 Jun 2007, Umar Farooq wrote: > Surprisingly, no matter what type of query I execute, when I use strace > to monitor the system calls generated they turn out to be the same for > ALL sorts of queries. How are you calling strace? The master postgres progress forks off new processes for each of the clients, you need to make sure you include stats from all of them as well to get anything. I normally use strace -c -f -p [main postgres process] which is helpful to collecte basic info, but even that's not quite right; you don't get the work done by the other proceses (logger, writer, stats collector). To get everything, you need to start some process that you attach strace to like this, then have that process start the server. I haven't found strace to be a great tool for this type of work. You might take at look at systemtap instead ( http://sourceware.org/systemtap/wiki ) which is a bit immature but is going the right direction. I will now bow my head and wait for someone to suggest you move to an OS that supports dtrace. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD