Re: High COMMIT times

Поиск
Список
Период
Сортировка
От Don Seiler
Тема Re: High COMMIT times
Дата
Msg-id CAHJZqBCPEqGO7LndbuEvMLb6s3AwJABG4SPFBjJk8V1FcP7Y2w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: High COMMIT times  (Craig Jackson <craig.jackson@broadcom.com>)
Ответы Re: High COMMIT times  (Don Seiler <don@seiler.us>)
Список pgsql-performance
On Mon, Jan 11, 2021 at 9:06 AM Craig Jackson <craig.jackson@broadcom.com> wrote:
How far apart are the min/max connection settings on your application connection pool? We had a similar issue with connection storms in the past on Oracle. One thing we did to minimize the storms was make sure there was not a wide gap between the min/max, say no more than a 5-10 connection difference between min/max.

App instances by default are configured for 10 connections in their Hikari connection pool, with no different setting for min so it's always 10. Some have begun setting a minimumIdle to 5. I'm pushing them now to lower their minimumIdle to something like 2, and if they are scaled out to multiple app instances then they should think about lowering their max from 10 to 5 perhaps.

From a recent spike from this morning (names have been changed, but other data is real):

From this morning's spike. At 06:03:15, service foo had 2 active sessions and 127 idle sessions. At 06:03:30 (the next tick in grafana), it had 5 active sessions but 364 idle sessions. The foo_db DB overall had 9 active and 337 idle at 06:03:15, and then 5 active and 788 idle overall in the next tick. So a flood of new connections were created within that 15 second interval (probably all within the same second) and more or less abandoned.
 
Don.
--
Don Seiler
www.seiler.us

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

Предыдущее
От: Craig Jackson
Дата:
Сообщение: Re: High COMMIT times
Следующее
От: Rémi Chatenay
Дата:
Сообщение: How to deal with analyze gathering irrelevant stats