Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

Next:From: pasman pasmaƄskiDate: 2010-11-24 14:48:43
Subject: Optimizing query
Previous:From: Vitalii TymchyshynDate: 2010-11-24 08:58:16
Subject: Re: Performance under contention

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group