Re: pgbench with libevent?

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: pgbench with libevent?
Дата
Msg-id
f526fd90-5cd1-1a33-bbe7-117286499d62@mines-paristech.fr
Ответ на
Список
Дерево обсуждения
pgbench with libevent? Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench with libevent? Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench with libevent? Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: pgbench with libevent? Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench with libevent? Thomas Munro <thomas.munro@gmail.com>
Re: pgbench with libevent? Tatsuo Ishii <ishii@sraoss.co.jp>
Re: pgbench with libevent? Thomas Munro <thomas.munro@gmail.com>
Re: pgbench with libevent? Tatsuo Ishii <ishii@sraoss.co.jp>
Re: pgbench with libevent? Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench with libevent? Fabien COELHO <coelho@cri.ensmp.fr>

Hello Thomas,

>>> Pgbench is managing clients I/Os manually with select or poll. Much of this
>>> could be managed by libevent.
>>
>> Or maybe libuv (used by nodejs?).
>>
>> From preliminary testing libevent seems not too good at fine grain time
>> management which are used for throttling, whereas libuv advertised that it
>> is good at it, although what it does is yet to be seen.
>
> Do you think our WaitEventSet stuff could be good here, if made
> frontend-friendly?

Interesting question.

AFAICS, the answer is that it could indeed probably fit the task, but it 
would require significant work to make it thread-compatible, and to 
untangle it from IsUnderPosmaster/postmaster death, memory context, 
elog/ereport, and other back-end specific stuff.

If you remove all that with a clean abstraction (quite a task), then once 
done the question could be why not use libevent/libuv/… in the backend 
instead of maintaining more or less the same thing inside postgres?

So ISTM that as far as pgbench is concerned it would be much simpler to 
use libevent/libuv/… directly if the pros are enough and the cons not 
redhibitory, and provided that the needed detailed features are really 
there.

-- 
Fabien.
В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата:
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench with libevent?
FAQ