Re: High SYS CPU - need advise

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: sthomas(at)optionshouse(dot)com, Vlad <marchenko(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: High SYS CPU - need advise
Date: 2012-11-20 17:05:13
Message-ID: CAHyXU0zm3sF3xRguH5Rh=r1YnAQD6uaY+aCfi8HFx7C0in8guQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 20, 2012 at 10:50 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> On Tue, Nov 20, 2012 at 8:03 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>> On Tue, Nov 20, 2012 at 9:02 AM, Shaun Thomas <sthomas(at)optionshouse(dot)com> wrote:
>>> On 11/16/2012 02:31 PM, Merlin Moncure wrote:
>>>
>>>> no single thing really stands out -- contention is all over the place.
>>>> lwlock, pinbuffer, dynahash (especially). I am again suspicious of
>>>> bad scheduler interaction. any chance we can fire up pgbouncer?
>>>
>>>
>>> Just want to throw it out there, but we've been having really bad luck with
>>> the scheduler recently. But only when we use 8GB (on our 72GB system) for
>>> shared_buffers. Cut that down to 4GB, and everything is fine and dandy.
>>>
>>> I think the kernel devs have added in some overzealous scheduler code on us.
>>
>> Shared buffer manipulation changing contention is suggesting you're
>> running into free list lock issues.
>
> I wouldn't expect so. Increasing shared_buffers should either fix
> free list lock contention, or leave it unchanged, not make it worse.

AIUI, that is simply not true (unless you raise it to the point you're
not churning them). I'm looking at StrategyGetBuffer() for non-scan
cases. It locks "BufFreelistLock" then loops the free list, and, if
it finds nothing, engages a clock sweep. Both of those operations are
dependent on the number of buffers being managed and so it's
reasonable to expect some workloads to increase contention with more
buffers.

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2012-11-20 18:16:48 Re: High SYS CPU - need advise
Previous Message Merlin Moncure 2012-11-20 16:53:08 Re: High SYS CPU - need advise