Re: WALWriteLocks

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: WALWriteLocks
Дата
Msg-id 38d3ba77341d35afbee921cf8dbce4fe70951763.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: WALWriteLocks  (Don Seiler <don@seiler.us>)
Список pgsql-admin
On Thu, 2021-04-29 at 11:11 -0500, Don Seiler wrote:
> On Thu, Apr 29, 2021 at 1:38 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > My gues is that you have too many active client connections, and you are suffering
> > from contention between the many backends that all want to write WAL.
> > 
> > In that case, use a connection pool to limit the number of active connections.
> 
> We do have pgbouncer in place already.

What is the maximum pool size?
How many connections in state "active" do you have?

> What I really want to know in this case is if there is some other PG operation that
>  accounts for a WALWriteLock wait, or is it always an I/O (write) to the WAL file
>  storage, and we can focus our investigation there? 

WALWriteLock: must be held to write WAL buffers to disk (XLogWrite or XLogFlush).

It might be I/O overload, but it could also be internal contention for the lock.
Check the "%iowait" column in "sar -u 1".

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




В списке pgsql-admin по дате отправления:

Предыдущее
От: Vijaykumar Jain
Дата:
Сообщение: Re: WALWriteLocks
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: WALWriteLocks