Re: Performance under contention

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance under contention
Date: 2010-11-24 01:09:32
Message-ID: AANLkTi=SsjhNGVWsYZFQcsEv2ZoHDHTpKCx=nC9Q9Huj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 24 November 2010 01:11, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> wrote:
> On 11/22/2010 11:38 PM, Ivan Voras wrote:

>> It looks like a hack (and one which is already implemented by connection
>> pool software); the underlying problem should be addressed.
>
> My (poor) understanding is that addressing the underlying problem would
> require a massive restructure of postgresql to separate "connection and
> session state" from "executor and backend". Idle connections wouldn't
> require a backend to sit around unused but participating in all-backends
> synchronization and signalling. Active connections over a configured maximum
> concurrency limit would queue for access to a backend rather than fighting
> it out for resources at the OS level.
>
> The trouble is that this would be an *enormous* rewrite of the codebase, and
> would still only solve part of the problem. See the prior discussion on
> in-server connection pooling and admission control.

I'm (also) not a PostgreSQL developer so I'm hoping that someone who
is will join the thread, but speaking generally, there is no reason
why this couldn't be a simpler problem which just requires
finer-grained locking or smarter semaphore usage.

I'm not talking about forcing performance out of situation where there
are no more CPU cycles to take, but about degrading gracefully in
those circumstances and not taking a 80%+ drop because of spinning
around in semaphore syscalls.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2010-11-24 03:11:18 Re: postmaster consuming /lots/ of memory with hash aggregate. why?
Previous Message Craig Ringer 2010-11-24 00:11:28 Re: Performance under contention