From: | Alexander Pyhalov <alp(at)sfedu(dot)ru> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | LWLock optimization |
Date: | 2019-07-23 16:28:52 |
Message-ID: | VI1PR05MB620666631A41186ACC3FC91ACFC70@VI1PR05MB6206.eurprd05.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi.
I was asked to bring up this topic on maling lists after asking question on IRC.
The issue is the following.
On one of our servers (10.5), I see a lot of queries with wait_event_type='LWLock', wait_event='lock_manager'
This is a stat gathering/analyzing application with tables which have > 100 partitions.
The queries itself are mostly simple (select by pkey, update by primary key and so on).
select count(*) from pg_locks shows about 40K records (all granted) and
select count(*) from (select distinct locktype,database,relation,page,tuple,virtualxid,transactionid,classid,objid,objsubid from pg_locks)
is varying from about 1K to 25K (I haven't stored this value in monitoring system, just observed manually).
Currently I was adviced to increase LOG2_NUM_LOCK_PARTITIONS at compile time. If it bothers us enough, we would likely do it, but I have a question, if this (or NUM_LOCK_PARTITIONS) value should be increased by default or set tunable?
С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2019-07-23 17:23:40 | Re: Default ordering option |
Previous Message | Tom Lane | 2019-07-23 16:20:54 | Re: pg_upgrade : 9.X to 11.X issue CentoOS 7.6 |