Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B957565022E for ; Wed, 17 Dec 2008 11:22:13 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95087-06 for ; Wed, 17 Dec 2008 11:22:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f10.google.com (mail-gx0-f10.google.com [209.85.217.10]) by mail.postgresql.org (Postfix) with ESMTP id 2F764650226 for ; Wed, 17 Dec 2008 11:22:06 -0400 (AST) Received: by gxk3 with SMTP id 3so325052gxk.19 for ; Wed, 17 Dec 2008 07:22:05 -0800 (PST) Received: by 10.151.145.21 with SMTP id x21mr1558797ybn.97.1229527324878; Wed, 17 Dec 2008 07:22:04 -0800 (PST) Received: by 10.151.153.17 with HTTP; Wed, 17 Dec 2008 07:22:04 -0800 (PST) Message-ID: <3073cc9b0812170722l75a873ffsf1dbee6c78048be7@mail.gmail.com> Date: Wed, 17 Dec 2008 10:22:04 -0500 From: "Jaime Casanova" To: "Albe Laurenz" Subject: Re: measure database contention Cc: "psql performance list" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <3073cc9b0812161132w3ae157a8n69e2b0cccea05ca2@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/162 X-Sequence-Number: 32198 On Wed, Dec 17, 2008 at 2:34 AM, Albe Laurenz wro= te: > Jaime Casanova wrote: >> we have a some bad queries (developers are working on that), some of >> them run in 17 secs and that is the average but when analyzing logs i >> found that from time to time some of them took upto 3 mins (the same >> query that normally runs in 17secs). >> >> so my question is: how could i look for contention problems? > > A good first step is to identify the bottleneck. > > Frequently, but not always, this is I/O. > Do you see a lot of I/O wait? Are the disks busy? > the disks are an RAID 10 with 4 sata disks of 15000rpm and nop iostat reports avg of 0.12 iowait > I don't know anything about your system, but I once experienced a > similar problem with a 2.6 Linux system where things improved considerabl= y > after changing the I/O-scheduler to "elevator=3Ddeadline". > i don't understand I/O-schedulers at all... anyone knows what is the recommended for postgres? --=20 Atentamente, Jaime Casanova Soporte y capacitaci=F3n de PostgreSQL Asesor=EDa y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157