Re: Built-in connection pooler

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Built-in connection pooler
Дата
Msg-id ca90d2cc-6fbf-e9fa-19b9-b4456bbabdff@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Built-in connection pooler  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers

On 29.01.2019 0:10, Bruce Momjian wrote:
> On Thu, Jan 24, 2019 at 08:14:41PM +0300, Konstantin Knizhnik wrote:
>> The main differences with pgbouncer&K are that:
>>
>> 1. It is embedded and requires no extra steps for installation and
>> configurations.
>> 2. It is not single threaded (no bottleneck)
>> 3. It supports all clients (if client needs session semantic, then it will be
>> implicitly given dedicated backend)
>>
>>
>> Some performance results (pgbench -S -n):
>>
>> ┌────────────────┬────────┬─────────────┬─────────┬─────────────────────────┐
>> │ #Connections   │ Proxy  │ Proxy/SSL   │ Direct  │ Direct/SSL   │
>> ├────────────────┼────────┼─────────────┼─────────┼──────────────┤
>> │ 1              │  13752 │       12396 │   17443 │        15762 │
>> ├────────────────┼────────┼─────────────┼─────────┼──────────────┤
>> │ 10             │  53415 │       59615 │   68334 │        85885 │
>> ├────────────────┼────────┼─────────────┼─────────┼──────────────┤
>> │ 1000           │  60152 │       20445 │   60003 │        24047 │
>> └────────────────┴────────┴─────────────┴─────────┴──────────────┘
> It is nice it is a smaller patch.  Please remind me of the performance
> advantages of this patch.
>
The primary purpose of pooler is efficient support of large number of 
connections and minimizing system resource usage.
But as far as Postgres is not scaling well at SMP system with larger 
number of CPU cores (due to many reasons discussed in hackers)
reducing number of concurrently working backends can also significantly 
increase performance.

I have not done such testing yet but I am planing to do it as well as 
comparison with pgbouncer and Odyssey.
But please notice that this proxy approach is by design slower than my 
previous implementation used in PgPRO-EE (based on socket redirection).
At some workloads connections throughout proxy cause up to two times 
decrease of performance comparing with dedicated backends.
There is no such problem with old connection pooler implementation which 
was always not worser than vanilla. But it doesn't support SSL connections
and requires much more changes in Postgres core.







-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: "Takashi Menjo"
Дата:
Сообщение: RE: static global variable openLogOff in xlog.c seems no longer used
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: Built-in connection pooler