Re: Configure template change to use SysV Semaphors on darwin

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Configure template change to use SysV Semaphors on darwin
Дата
Msg-id 9120.1190764686@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Configure template change to use SysV Semaphors on darwin  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
I wrote:
> Awhile back, Chris Marcellino <cmarcellino@apple.com> wrote:
>> If this is in fact the case, I have a trivial patch to conditionally
>> enable SysV semaphores based on the OS release:

> I've tried this patch on my Mac laptop, and while it seems to work as
> advertised in terms of not eating a boatload of file descriptors,
> I was disturbed to find that it seems consistently a couple percent
> slower than the POSIX-sema code according to pgbench.

I rechecked this using PG CVS HEAD and can no longer reproduce a
slowdown --- in fact, the SYSV-sema code is marginally faster.
It's well within the noise level of pgbench, but anyway this seems
enough to allay my fears of a performance drop:

posix:

g42:~ tgl$ pgbench -c 10 -t 1000 bench
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 10
number of clients: 10
number of transactions per client: 1000
number of transactions actually processed: 10000/10000
tps = 107.051937 (including connections establishing)
tps = 107.207220 (excluding connections establishing)

sysv:

g42:~ tgl$ pgbench -c 10 -t 1000 bench
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 10
number of clients: 10
number of transactions per client: 1000
number of transactions actually processed: 10000/10000
tps = 107.565526 (including connections establishing)
tps = 107.730181 (excluding connections establishing)

I am not sure what changed since May, but one possibility is that
I just recently boosted the sysv shmem limit on my laptop.  I think
the previous runs were probably taken with max_connections of 30
or so, whereas these numbers have max_connections = 100.  That's
relevant since there are 3x more semaphores needed.

Anyway, getting rid of all the file descriptors for Posix semas
seems Clearly A Good Idea, so I'll go ahead and apply this patch.
Thanks for sending it in.

            regards, tom lane

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

Предыдущее
От: Julius Stroffek
Дата:
Сообщение: Re: Optimizer hook
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimizer hook