Re: Performance under contention

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Performance under contention
Дата
Msg-id AANLkTi=FosOakJr84x5pchZ65Fi9Gt4yqcsvSHTazLyR@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Performance under contention  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
On Mon, Dec 6, 2010 at 12:10 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sun, Nov 21, 2010 at 7:15 PM, Ivan Voras <ivoras@freebsd.org> wrote:
>> The "sbwait" part is from FreeBSD - IPC sockets, but so much blocking on
>> semwait indicates large contention in PostgreSQL.
>
> I can reproduce this.  I suspect, but cannot yet prove, that this is
> contention over the lock manager partition locks or the buffer mapping
> locks.

I compiled with LWLOCK_STATS defined and found that exactly one lock
manager partition lwlock was heavily contended, because, of course,
the SELECT-only test only hits one table, and all the threads fight
over acquisition and release of AccessShareLock on that table.  One
might argue that in more normal workloads there will be more than one
table involved, but that's not necessarily true, and in any case there
might not be more than a handful of major ones.

However, I don't have a very clear idea what to do about it.
Increasing the number of lock partitions doesn't help, because the one
table you care about is still only in one partition.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT
Следующее
От: bricklen
Дата:
Сообщение: Re: Update problem on large table