Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VN5BR-0007z2-W7 for pgsql-performance@arkaria.postgresql.org; Fri, 20 Sep 2013 18:12:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VN5BR-00040i-G9 for pgsql-performance@arkaria.postgresql.org; Fri, 20 Sep 2013 18:12:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VN5BQ-00040b-8j for pgsql-performance@postgresql.org; Fri, 20 Sep 2013 18:12:00 +0000 Received: from mail-vc0-f175.google.com ([209.85.220.175]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VN5BK-00018o-Lj for pgsql-performance@postgresql.org; Fri, 20 Sep 2013 18:11:59 +0000 Received: by mail-vc0-f175.google.com with SMTP id ia10so555278vcb.20 for ; Fri, 20 Sep 2013 11:11:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=OWDPlbPK5/7vIi65kQXTsR0NEjUyA47065dA2XZ9Fw4=; b=Vwfao/67R5YPqJlvzID0R0k7HCVxLmo0c70tzXGd5uIJxuDNQoe8mXk3Z0vXmywyvB ro5ue7Og8kyNdNGWoeC4B+xY6jsvyg6Vrhj0heQNXxeY9ngH0lkJZDQOAsCeQJaqWzDR 6UUpTKbj9JUi2mnU44hKMGOwPZYAsqRkf2wfZrBbL1FGczeyjOxuOjRkWEtAldycou3e Xipn2ZgS4ztgGC3CxlyR/ULxJlWKmRYAGfgu0qgUfo8dEZTMmkyZePi54c6gsWjX9QGg dy3YeIYWWJcrle7v88XFCa4ww5AjDkXdVU+j47Ae2CAacyf1+D3UMj3HhTTLvdhky9Lg z1IA== X-Gm-Message-State: ALoCoQlshzC4YqEEYikixsoWE6OIe67LrP+11HJ/Gr9XyPCXxLqlNYtsqVWj/BpF37w9uNf2wDwM X-Received: by 10.52.27.243 with SMTP id w19mr6108199vdg.3.1379700713078; Fri, 20 Sep 2013 11:11:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.224.11 with HTTP; Fri, 20 Sep 2013 11:11:12 -0700 (PDT) In-Reply-To: References: <20130911171736.GA1134305@alap2.anarazel.de> From: David Whittaker Date: Fri, 20 Sep 2013 14:11:12 -0400 Message-ID: Subject: Re: Intermittent hangs with 9.2 To: Merlin Moncure Cc: PostgreSQL Performance , Andres Freund Content-Type: multipart/alternative; boundary=20cf307cfd68e6583a04e6d49a4e X-Pg-Spam-Score: -2.6 (--) 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 --20cf307cfd68e6583a04e6d49a4e Content-Type: text/plain; charset=ISO-8859-1 We haven't seen any issues since we decreased shared_buffers. We also tuned some of the longer running / more frequently executed queries, so that may have had an effect as well, but my money would be on the shared_buffers change. If the issue re-appears I'll try to get a perf again and post back, but if you don't hear from me again you can assume the problem is solved. Thank you all again for the help. -Dave On Fri, Sep 13, 2013 at 11:05 AM, David Whittaker wrote: > > > > On Fri, Sep 13, 2013 at 10:52 AM, Merlin Moncure wrote: > >> On Thu, Sep 12, 2013 at 3:06 PM, David Whittaker wrote: >> > Hi All, >> > >> > We lowered shared_buffers to 8G and increased effective_cache_size >> > accordingly. So far, we haven't seen any issues since the adjustment. >> The >> > issues have come and gone in the past, so I'm not convinced it won't >> crop up >> > again, but I think the best course is to wait a week or so and see how >> > things work out before we make any other changes. >> > >> > Thank you all for your help, and if the problem does reoccur, we'll look >> > into the other options suggested, like using a patched postmaster and >> > compiling for perf -g. >> > >> > Thanks again, I really appreciate the feedback from everyone. >> >> Interesting -- please respond with a follow up if/when you feel >> satisfied the problem has gone away. Andres was right; I initially >> mis-diagnosed the problem (there is another issue I'm chasing that has >> a similar performance presentation but originates from a different >> area of the code). >> >> That said, if reducing shared_buffers made *your* problem go away as >> well, then this more evidence that we have an underlying contention >> mechanic that is somehow influenced by the setting. Speaking frankly, >> under certain workloads we seem to have contention issues in the >> general area of the buffer system. I'm thinking (guessing) that the >> problems is usage_count is getting incremented faster than the buffers >> are getting cleared out which is then causing the sweeper to spend >> more and more time examining hotly contended buffers. This may make >> no sense in the context of your issue; I haven't looked at the code >> yet. Also, I've been unable to cause this to happen in simulated >> testing. But I'm suspicious (and dollars to doughnuts '0x347ba9' is >> spinlock related). >> >> Anyways, thanks for the report and (hopefully) the follow up. >> >> merlin >> > > You guys have taken the time to help me through this, following up is the > least I can do. So far we're still looking good. > --20cf307cfd68e6583a04e6d49a4e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
We haven't seen any issues since we decreased shared_b= uffers. =A0We also tuned some of the longer running / more frequently execu= ted queries, so that may have had an effect as well, but my money would be = on the shared_buffers change. =A0If the issue re-appears I'll try to ge= t a perf again and post back, but if you don't hear from me again you c= an assume the problem is solved.

Thank you a= ll again for the help.

-Dave

On Fri, Sep 13, 20= 13 at 11:05 AM, David Whittaker <dave@iradix.com> wrote:



On Fri, Sep 1= 3, 2013 at 10:52 AM, Merlin Moncure <mmoncure@gmail.com> wr= ote:
On Thu, Sep 12, 2013 at 3:06 PM, David = Whittaker <dave@ira= dix.com> wrote:
> Hi All,
>
> We lowered shared_buffers to 8G and increased effective_cache_size
> accordingly. =A0So far, we haven't seen any issues since the adjus= tment. =A0The
> issues have come and gone in the past, so I'm not convinced it won= 't crop up
> again, but I think the best course is to wait a week or so and see how=
> things work out before we make any other changes.
>
> Thank you all for your help, and if the problem does reoccur, we'l= l look
> into the other options suggested, like using a patched postmaster and<= br> > compiling for perf -g.
>
> Thanks again, I really appreciate the feedback from everyone.

Interesting -- please respond with a follow up if/when you feel
satisfied the problem has gone away. =A0Andres was right; I initially
mis-diagnosed the problem (there is another issue I'm chasing that has<= br> a similar performance presentation but originates from a different
area of the code).

That said, if reducing shared_buffers made *your* problem go away as
well, then this more evidence that we have an underlying contention
mechanic that is somehow influenced by the setting. =A0Speaking frankly, under certain workloads we seem to have contention issues in the
general area of the buffer system. =A0I'm thinking (guessing) that the<= br> problems is usage_count is getting incremented faster than the buffers
are getting cleared out which is then causing the sweeper to spend
more and more time examining hotly contended buffers. =A0This may make
no sense in the context of your issue; I haven't looked at the code
yet. =A0Also, I've been unable to cause this to happen in simulated
testing. =A0But I'm suspicious (and dollars to doughnuts '0x347ba9&= #39; is
spinlock related).

Anyways, thanks for the report and (hopefully) the follow up.

merlin

You gu= ys have taken the time to help me through this, following up is the least I= can do. =A0So far we're still looking good.

--20cf307cfd68e6583a04e6d49a4e--