Re: something is wonky with pgbench pipelining

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: something is wonky with pgbench pipelining
Date: 2021-07-24 23:08:33
Message-ID: 20210724230833.5trny35utntla6ch@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Adding RMT.

On 2021-07-21 16:55:08 -0700, Andres Freund wrote:
> On 2021-07-20 14:57:15 -0400, Alvaro Herrera wrote:
> > On 2021-Jul-20, Andres Freund wrote:
> >
> > > I think what's happening is that the first recvfrom() actually gets all 7
> > > connection results. The server doesn't have any queries to process at that
> > > point. But we ask the kernel whether there is new network input over and over
> > > again, despite having results to process!
> >
> > Hmm, yeah, that seems a missed opportunity.
>
> > > with-isbusy:
> > > ...
> > > tps = 3990.424742 (without initial connection time)
> > > ...
> > > 1,013.71 msec task-clock # 0.202 CPUs utilized
> > > 80,203 raw_syscalls:sys_enter # 79.119 K/sec
> > > 19,947 context-switches # 19.677 K/sec
> > > 2,943,676,361 cycles:u # 2.904 GHz
> > > 346,607,769 cycles:k # 0.342 GHz
> > > 8,464,188,379 instructions:u # 2.88 insn per cycle
> > > 226,665,530 instructions:k # 0.65 insn per cycle
> >
> > This is quite compelling.
> >
> > If you don't mind I can get this pushed soon in the next couple of days
> > -- or do you want to do it yourself?
>
> I was thinking of pushing the attached, to both 14 and master, thinking
> that was what you meant, but then I wasn't quite sure: It's a relatively
> minor performance improvement, after all? OTOH, it arguably also just is
> a bit of an API misuse...
>
> I'm inclined to push it to 14 and master, but ...

RMT: ^

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-07-25 00:24:32 Re: Avoiding data loss with synchronous replication
Previous Message Andres Freund 2021-07-24 23:02:07 Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness