Re: High SYS CPU - need advise - Mailing list pgsql-general

From Merlin Moncure
Subject Re: High SYS CPU - need advise
Date
Msg-id CAHyXU0zm3sF3xRguH5Rh=r1YnAQD6uaY+aCfi8HFx7C0in8guQ@mail.gmail.com
Whole thread Raw
In response to Re: High SYS CPU - need advise  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: High SYS CPU - need advise  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On Tue, Nov 20, 2012 at 10:50 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
> On Tue, Nov 20, 2012 at 8:03 AM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> On Tue, Nov 20, 2012 at 9:02 AM, Shaun Thomas <sthomas@optionshouse.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


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: High SYS CPU - need advise
Next
From: Matthew Vernon
Date:
Subject: COPY FROM in psql