pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: something is wonky with pgbench pipelining
Date: Tue, 20 Jul 2021 14:57:15 -0400
Message-ID: <202107201857.kyv2gv3ouxot@alvherre.pgsql> (raw)
In-Reply-To: <20210720180039.23rivhdft3l4mayn@alap3.anarazel.de>

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?

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"La espina, desde que nace, ya pincha" (Proverbio africano)





view thread (5+ messages)  latest in thread

Message-ID: <202107201857.kyv2gv3ouxot@alvherre.pgsql>
Permalink:  ../202107201857.kyv2gv3ouxot@alvherre.pgsql/
Also on:    postgresql.org/message-id/202107201857.kyv2gv3ouxot@alvherre.pgsql

 · 

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: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, andres@anarazel.de
  Subject: Re: something is wonky with pgbench pipelining
  In-Reply-To: <202107201857.kyv2gv3ouxot@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox