Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 3AC142E004E for ; Wed, 23 Apr 2008 02:43:33 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 74832-10 for ; Wed, 23 Apr 2008 02:43:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from westnet.com (westnet.com [216.187.52.2]) by developer.postgresql.org (Postfix) with ESMTP id 785312E0046 for ; Wed, 23 Apr 2008 02:43:30 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m3N5hRFm028306; Wed, 23 Apr 2008 01:43:27 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m3N5hRqW028302; Wed, 23 Apr 2008 01:43:27 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Wed, 23 Apr 2008 01:43:27 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Rafael Barrera Oro cc: pgsql-performance@postgresql.org Subject: Re: Suspicious top output In-Reply-To: <480E2FBE.3010607@akyasociados.com.ar> Message-ID: References: <480E2FBE.3010607@akyasociados.com.ar> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/339 X-Sequence-Number: 29832 On Tue, 22 Apr 2008, Rafael Barrera Oro wrote: > Hello, i have a postgresql server running and from time to time it gets > painfully slow. The usual information you should always include when posting messages here is PostgreSQL and operating system versions. > When this happens i usually connect to the server and run a "top" > command The other thing you should fire up in another window is "vmstat 1" to figure out just what's going on in general. The great thing about those is you can save them when you're done and easily analyze the results later easily, which is trickier to do with top. > 71872 pgsql 1 4 0 48552K 42836K sbwait 1:41 4.79% > postgres Some searching found this interesting suggestion from Darcy about things stuck in sbwait: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/performance/2004-03/0015.html -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD