Re: WALWriteLock

From: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Yambu <hyambu(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: WALWriteLock
Date: 2021-07-07 20:14:05
Message-ID: CAM+6J95qpTyOiK=8aCxEc2CAbi=6xa+u=_DUTOu1PG8wx0Ts6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jul 8, 2021, 1:22 AM Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:

> On Tue, Jul 6, 2021 at 10:14 AM Yambu <hyambu(at)gmail(dot)com> wrote:
>
>> Hello
>>
>> I'm seeing a lot of WALWriteLocks , is this a bad sign , what might cause
>> this?
>>
>
> Are you having a performance problem you are trying to track down? If so,
> this probably indicates the cause. If not, then it is probably not a bad
> sign.
>
> The likely cause is that multiple sessions are trying to COMMIT at the
> same time, and are blocking on the slow fsync of the WAL data. One process
> will block on WALSync, all the ones queued up behind it will block on
> WALWrite.
>

Is this reproducible ? I mean I have seen multiple ppl raising a similar
issue but I could not really reproduce on my laptop, tried with slow disk,
introducing random latency etc. I even tried running gdb on a few processes
and trying to force into acquire a walwrite lock but not release it etc but
I guess I was not doing it correctly.

If the db is slowed down due to high concurrent usage trying to commit at
same time, how do we arrive at a baseline of how much a server can handle
before it starts tripping.

>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Janes 2021-07-07 20:51:36 Re: WALWriteLock
Previous Message Jeff Janes 2021-07-07 20:12:41 Re: D in top results for checkpoint