public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fabien COELHO <[email protected]>
To: Thomas Munro <[email protected]>
Cc: PostgreSQL Developers <[email protected]>
Subject: Re: pgbench with libevent?
Date: Mon, 14 Aug 2023 12:09:52 +0200 (CEST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+hUKGK8St8+hJ1kb1fygEzNwgJunVyBL-+1pg-6W+JJPmOnyA@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CA+hUKGK8St8+hJ1kb1fygEzNwgJunVyBL-+1pg-6W+JJPmOnyA@mail.gmail.com>
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.
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pgbench with libevent?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox