Re: Report distinct wait events when waiting for WAL "operation" - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Report distinct wait events when waiting for WAL "operation"
Date
Msg-id CAA4eK1Ktxtz3LkfhqwasczKQTv=BMwQLy9TNJgcpkRGchvouHw@mail.gmail.com
Whole thread Raw
In response to Report distinct wait events when waiting for WAL "operation"  (Andres Freund <andres@anarazel.de>)
Responses Re: Report distinct wait events when waiting for WAL "operation"
List pgsql-hackers
On Mon, Jul 17, 2023 at 10:26 PM Andres Freund <andres@anarazel.de> wrote:
>
> Previously it was e.g. not really possible to distinguish that something like
> this:
>
> ┌────────────────┬─────────────────┬────────────┬───────┐
> │  backend_type  │ wait_event_type │ wait_event │ count │
> ├────────────────┼─────────────────┼────────────┼───────┤
> │ client backend │ LWLock          │ WALInsert  │    32 │
> │ client backend │ (null)          │ (null)     │     9 │
> │ walwriter      │ IO              │ WALWrite   │     1 │
> │ client backend │ Client          │ ClientRead │     1 │
> │ client backend │ LWLock          │ WALWrite   │     1 │
> └────────────────┴─────────────────┴────────────┴───────┘
>
> is a workload with a very different bottleneck than this:
>
> ┌────────────────┬─────────────────┬───────────────┬───────┐
> │  backend_type  │ wait_event_type │  wait_event   │ count │
> ├────────────────┼─────────────────┼───────────────┼───────┤
> │ client backend │ IPC             │ WALWaitInsert │    22 │
> │ client backend │ LWLock          │ WALInsert     │    13 │
> │ client backend │ LWLock          │ WALBufMapping │     5 │
> │ walwriter      │ (null)          │ (null)        │     1 │
> │ client backend │ Client          │ ClientRead    │     1 │
> │ client backend │ (null)          │ (null)        │     1 │
> └────────────────┴─────────────────┴───────────────┴───────┘
>
> even though they are very different
>
> FWIW, the former is bottlenecked by the number of WAL insertion locks, the
> second is bottlenecked by copying WAL into buffers due to needing to flush
> them.
>

This gives a better idea of what's going on. +1 for separating these waits.

-- 
With Regards,
Amit Kapila.

pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Disabling Heap-Only Tuples
Next
From: "赵锐(惜元)"
Date:
Subject: pg_rewind fails with in-place tablespace