Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLvRf-0005P3-NR for pgsql-performance@arkaria.postgresql.org; Tue, 17 Sep 2013 13:35:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VLvRf-000551-7U for pgsql-performance@arkaria.postgresql.org; Tue, 17 Sep 2013 13:35:59 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLvRe-00054v-CI for pgsql-performance@postgresql.org; Tue, 17 Sep 2013 13:35:58 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLvRT-0000yt-OI for pgsql-performance@postgresql.org; Tue, 17 Sep 2013 13:35:57 +0000 Received: from anarazel.de (p5DDC4CBE.dip0.t-ipconnect.de [93.220.76.190]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0M2CDg-1WDtXa3xWm-00s8Nx; Tue, 17 Sep 2013 15:35:47 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 4092A100D8A; Tue, 17 Sep 2013 15:35:46 +0200 (CEST) Date: Tue, 17 Sep 2013 15:35:46 +0200 From: Andres Freund To: Merlin Moncure Cc: =?utf-8?B?0JTQvNC40YLRgNC40Lkg0JTQtdCz0YLRj9GA0ZHQsg==?= , postgres performance list Subject: Re: Cpu usage 100% on slave. s_lock problem. Message-ID: <20130917133546.GE5452@awork2.anarazel.de> References: <20130827155556.GA9061@awork2.anarazel.de> <20130917115926.GA5452@awork2.anarazel.de> <20130917132439.GD5452@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:8MOq2G1OJgX36ngz3l8AkN49eRfbbE0gkcZnPZzUWXa wwen4f+9CzdOqMUcxwqbMQiP/xZpTTUjnD9TNU4GdJCTUA2kRr hTkrKnvhL7WiV//OeOK1dRkaJiF3YAmMCsFWR76eumQ3iUsw/T WSbXb2wbb+65OIWuE8Kbennx683ZAV9EjJwk7JD/8oMXXUAoK5 F1cEX3qHD6rQvTL+Ye50en4C1k6c459XYNZhwWpY5zyRDLi4jP nyoLS58w2pvVSBrrO39Dj5QIlUMWB9pY0+Am5qdhuoNv2zrZWl 3p6InV7G3s1Y/MDBPrAdIS4MKxBpjrhKZ8To+DAn3Y9W9ZDank OnjuJTN9akm2lbppXWrU7s9KG+Mx9HBfl55fAczG9 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 2013-09-17 08:32:30 -0500, Merlin Moncure wrote: > On Tue, Sep 17, 2013 at 8:24 AM, Andres Freund wrote: > > On 2013-09-17 08:18:54 -0500, Merlin Moncure wrote: > >> Do you think it's worth submitting the lock avoidance patch for formal review? > > > > You mean the bufmgr.c thing? Generally I think that that code needs a > > good of scalability work - there's a whole thread about it > > somewhere. But TBH the theories you've voiced about the issues you've > > seen haven't convinced me so far. > > er, no (but I share your skepticism -- my challenge right now is to > demonstrate measurable benefit which so far I've been unable to do). > I was talking about the patch on *this* thread which bypasses the > s_lock in RecoveryInProgress() :-). Ah, yes. Sorry confused issues ;). Yes, I think that'd made sense. > > Quick question: Do you happen to have pg_locks output from back then > > around? We've recently found servers going into somewhat similar > > slowdowns because they exhausted the fastpath locks which made lwlocks > > far more expensive and made s_lock go up very high in the profle. > > I do. Unfortunately I don't have profile info. Not sure how useful > it is -- I'll send it off-list. Great. The primary thing I'd like to know is whether there are lots of non-fastpath locks... If you ever get into the situation I mistakenly referred to again, I'd strongly suggest recompling postgres with -fno-omit-frame-pointer. That makes hierarchical profiles actually useful which can help tremendously with diagnosing issues like this... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance