Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2A7101337A67 for ; Mon, 4 Apr 2011 06:02:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 52152-01 for ; Mon, 4 Apr 2011 09:02:17 +0000 (UTC) X-Greylist: delayed 00:50:27.657658 by SQLgrey-1.7.6 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by mail.postgresql.org (Postfix) with ESMTP id 318A61337A5D for ; Mon, 4 Apr 2011 06:02:16 -0300 (ADT) Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p348BkGS025051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2011 10:11:47 +0200 Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p348Bkee026098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2011 10:11:46 +0200 Received: from imsm3.zbt.uni-heidelberg.de (IMSM3.zbt.uni-heidelberg.de [129.206.91.36]) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id p348BjRh014463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2011 10:11:45 +0200 Message-ID: <4D997D3D.1080104@uni-heidelberg.de> Date: Mon, 04 Apr 2011 10:11:41 +0200 From: Lars Feistner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-performance@postgresql.org Subject: Re: very long updates very small tables References: <4D91EEFA.90707@uni-heidelberg.de> <4D91EC7E020000250003BEEC@gw.wicourts.gov> <4D92DD2C.8010305@uni-heidelberg.de> <4D931A0C020000250003BF80@gw.wicourts.gov> In-Reply-To: <4D931A0C020000250003BF80@gw.wicourts.gov> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/6 X-Sequence-Number: 43068 On 03/30/2011 06:54 PM, Kevin Grittner wrote: > Lars Feistner wrote: >> On 03/29/2011 09:28 PM, Kevin Grittner wrote: >>> Lars Feistner wrote: >>> >>>> The log tells me that certain update statements take sometimes >>>> about 3-10 minutes. But we are talking about updates on tables >>>> with 1000 to 10000 rows and updates that are supposed to update >>>> 1 row. >>> >>> The top possibilities that come to my mind are: > >> [all eliminated as possibilities] > > If you haven't already done so, you should probably turn on > checkpoint logging to see if this corresponds to checkpoint > activity. If it does, you can try cranking up how aggressive your > background writer is, and perhaps limiting your shared_buffers to > something around the size of your RAID controller's BBU cache. (I > hope you have a RAID controller with BBU cache configured for > write-back, anyway.) > > -Kevin > Hello Kevin, i am sorry to disappoint you here. As I said in my first E-Mail we don't have much traffic and the database fits easily into memory. The traffic might increase, at least it was increasing the last 12 months. The database will always fit into memory. No, we don't have a raid and thus we don't have a bbu. Actually we started off with a big SAN that our data centre offered. But sometimes this SAN was a bit slow and when we first encountered the very long updates i thought there was a connection between the long running updates and the slowliness of the SAN, so i started to use the local disk (we are talking about one disk not disks) for the database. I am still seeing the long running inserts and updates. I am still following the auto vacuum trail, it does still not run frequently enough. Thanks a lot for the replies so far. I will keep you guys informed about my next steps and the results. Thanx a lot Lars -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lars Feistner Kompetenzzentrum für Prüfungen in der Medizin Medizinische Fakultät Heidelberg, Im Neuenheimer Feld 346, Raum 013 69120 Heidelberg E-Mail: feistner@uni-heidelberg.de Fon: +49-6221-56-8269 Fax: +49-6221-56-7175 WWW: http://www.ims-m.de http://www.kompmed.de ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~