Re: Reducing WaitEventSet syscall churn - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Reducing WaitEventSet syscall churn
Date
Msg-id CA+hUKGJMdwgULDAKBW3xu45sPWY+9vTrBdm2N+PL-jRy0AE1Kg@mail.gmail.com
Whole thread Raw
In response to Re: Reducing WaitEventSet syscall churn  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Reducing WaitEventSet syscall churn
List pgsql-hackers
On Tue, Jul 14, 2020 at 6:51 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> In the meantime, here's a rebase of the more straightforward patches
> in the stack.  These are the ones that deal only with fixed sets of
> file descriptors, and they survive check-world on Linux,
> Linux+EXEC_BACKEND (with ASLR disabled) and FreeBSD, and at least
> check on macOS and Windows (my CI recipes need more work to get
> check-world working on those two).  There's one user-visible change
> that I'd appreciate feedback on: I propose to drop the FATAL error
> when the postmaster goes away, to make things more consistent.  See
> below for more on that.

Here's the effect of patches 0001-0003 on the number of relevant
system calls generate by "make check" on Linux and FreeBSD, according
to strace/truss -f -c:

epoll_create1: 4,825 -> 865
epoll_ctl:     12,454 -> 2,721
epoll_wait:    ~45k -> ~45k
close:         ~81k -> ~77k

kqueue:        4,618 -> 866
kevent:        ~54k -> ~46k
close:         ~65k -> ~61k

I pushed those three patches, but will wait for more discussion on the rest.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Is it useful to record whether plans are generic or custom?
Next
From: Kasahara Tatsuhito
Date:
Subject: Re: Creating a function for exposing memory usage of backend process