Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGBcw-00087z-8m for pgsql-performance@arkaria.postgresql.org; Thu, 14 Mar 2013 17:07:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGBcv-00009d-PY for pgsql-performance@arkaria.postgresql.org; Thu, 14 Mar 2013 17:07:37 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGBcu-00009Y-UD for pgsql-performance@postgresql.org; Thu, 14 Mar 2013 17:07:37 +0000 Received: from mail.sihirhosting.com ([77.92.143.143]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGBcs-0002vE-U2 for pgsql-performance@postgresql.org; Thu, 14 Mar 2013 17:07:36 +0000 Received: (qmail 32038 invoked by uid 509); 14 Mar 2013 19:07:30 +0200 Received: from 212.156.129.218 by gaya (envelope-from , uid 507) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.7/2391. spamassassin: 3.0.2. perlscan: 1.25-st-qms. Clear:RC:0(212.156.129.218):SA:0(-97.0/6.7):. Processed in 1.720244 secs); 14 Mar 2013 17:07:30 -0000 X-Spam-Status: No, hits=-97.0 required=6.7 X-Antivirus-MYDOMAIN-Mail-From: emre.hasegeli@tart.com.tr via gaya X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:0(212.156.129.218):SA:0(-97.0/6.7):. Processed in 1.720244 secs Process 32026) Received: from unknown (HELO hasegeli.local) (emre.hasegeli@tart.com.tr@212.156.129.218) by mail.sihirhosting.com with AES256-SHA encrypted SMTP; 14 Mar 2013 19:07:29 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Jeff Janes" , "pgsql-performance@postgresql.org" Cc: "dba@tart.com.tr" Subject: Re: PostgreSQL 9.2.3 performance problem caused Exclusive locks References: Date: Thu, 14 Mar 2013 19:07:28 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Emre Hasegeli" Organization: =?utf-8?B?VGFydCDEsG50ZXJuZXQgVGVrbm9sb2ppbGVyaSBUaWNhcmV0IEHFng==?= Message-ID: In-Reply-To: User-Agent: Opera Mail/12.14 (MacIntel) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On Thu, 14 Mar 2013 06:53:55 +0200, Jeff Janes wrote: > On Friday, March 8, 2013, Emre Hasegeli wrote: > > PostgreSQL writes several following logs during the problem which I never >> saw before 9.2.3: >> >> LOG: process 4793 acquired ExclusiveLock on extension of relation >> 305605 >> of database 16396 after 2348.675 ms >> > > The key here is not that it is an ExclusiveLock, but rather than it is > the > relation extension lock. I don't think the extension lock is ever held > across user-code, or transaction boundaries, or anything like that. It > is > held over some small IOs. So if it blocked on that for over 2 seconds, > you > almost surely have some serious IO congestion. > > And this particular message is probably more a symptom of that congestion > than anything else. > > You said you rolled back to 9.2.2 and the stalling is still there. Are > you > still seeing the log message, or are you now seeing silently stalls? Did > you roll back all other changes that were made at the same time as the > upgrade to 9.2.3 (kernel versions, filesystem changes/versions, etc.)? I did not try with different kernel or file system. It was not because of 9.2.3, same problem occurred in both 9.2.2 and 9.2.3. Increasing max connections make it worse. It lasts almost 15 minutes in the last time. There were not much disk utilization while it is happening, "top" was pointing out most of the CPU usage on the %sy column, there were no IO wait. I saw "allocstalls" increasing on "atop". There were a lot of slow insert statements in the logs except ExclusiveLock waits. We were using 64 GiB of shared buffers. RhodiumToad suggested to reduce it on the IRC channel. It did not happen since then. It was a real problem for us. I could not find anything related to it. I cannot let it happen again on the production environment but I would be happy to share more experience, if it would help you fix it. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance