Re: Performance under contention

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Vitalii Tymchyshyn" <tivv00(at)gmail(dot)com>, "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: "Ivan Voras" <ivoras(at)freebsd(dot)org>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance under contention
Date: 2010-11-24 14:46:29
Message-ID: 4CECD0E50200002500037DE2@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Vitalii Tymchyshyn <tivv00(at)gmail(dot)com> wrote:

> the simplest option that will make most people happy would be to
> have a limit (waitable semaphore) on backends actively executing
> the query.

That's very similar to the admission control policy I proposed,
except that I suggested a limit on the number of active database
transactions rather than the number of queries. The reason is that
you could still get into a lot of lock contention with a query-based
limit -- a query could acquire locks (perhaps by writing rows to the
database) and then be blocked waiting its turn, leading to conflicts
with other transactions. Such problems would be less common with a
transaction limit, since most common locks don't persist past the
end of the transaction.

-Kevin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message pasman pasmański 2010-11-24 14:48:43 Optimizing query
Previous Message Vitalii Tymchyshyn 2010-11-24 08:58:16 Re: Performance under contention