Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLtwL-0001Zm-IY for pgsql-performance@arkaria.postgresql.org; Tue, 17 Sep 2013 11:59:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VLtwL-0002vx-2q for pgsql-performance@arkaria.postgresql.org; Tue, 17 Sep 2013 11:59:33 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLtwK-0002vr-75 for pgsql-performance@postgresql.org; Tue, 17 Sep 2013 11:59:32 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VLtwH-0007cA-5I for pgsql-performance@postgresql.org; Tue, 17 Sep 2013 11:59:31 +0000 Received: from anarazel.de (p5DDC4CBE.dip0.t-ipconnect.de [93.220.76.190]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M7EPO-1WA24v1joE-00wOoW; Tue, 17 Sep 2013 13:59:27 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 80579100B74; Tue, 17 Sep 2013 13:59:26 +0200 (CEST) Date: Tue, 17 Sep 2013 13:59:26 +0200 From: Andres Freund To: =?utf-8?B?0JTQvNC40YLRgNC40Lkg0JTQtdCz0YLRj9GA0ZHQsg==?= Cc: Merlin Moncure , postgres performance list Subject: Re: Cpu usage 100% on slave. s_lock problem. Message-ID: <20130917115926.GA5452@awork2.anarazel.de> References: <20130827155556.GA9061@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Provags-ID: V02:K0:7kfMVDGlc6lN++zabdm+QNEZz5bqV46POPCIiNOIcfI OAaGKeGEv5+QVUb7qmXDVw1FZ262N1+hxqTcJCpwPEYkO68wZc DZKBzFy1PUQfteWLAd+k15QLx24lAaMqZ5wZxLJ8Gl/1XdL51/ NfKEKTCihuODsl+sbb0FQzO+0MXUss7v3NXhcf2urfhiJ2HSmg a+Iu0TswLf6I4m+RVTlyAbzCbTZTiofnP/+CrMBDVZKSUrbNX8 O5G1SczlAjsSPI1+azuz2APJ62Qzu9wVsA8Sr9REuNd5+HKWWr E5dwFUl0A7LGl8W36p9OzssmJwYZh1MtYUUSi9SCerYSzgeSE6 YYcTvrdiFaMJlQFO14FWXCxoGv+tBvxW37swEhj9c X-Pg-Spam-Score: -0.5 (/) 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 Hi, On 2013-09-17 17:55:01 +0600, =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 = =D0=94=D0=B5=D0=B3=D1=82=D1=8F=D1=80=D1=91=D0=B2 wrote: > We have not been able to reproduce this problem on a test servers. Use th= is > patch to production servers do not dare. >=20 > In the course of studying the problems we have identified that many queri= es > are executed on the slave several times slower. On master function > heap_hot_search_buffer execute 100 cycles, on the slave the same query wi= th > the same plan function heap_hot_search_buffer execute 2000 cycles. > Also, we were able to reproduce the problem on the master and detect that > there s_lock of slow queries. What you describe is normally an indication that you have too many longrunning transactions around preventing hot pruning from working. Greetings, Andres Freund --=20 Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance