pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow Many PG_Locks are considered too many
6+ messages / 4 participants
[nested] [flat]
* How Many PG_Locks are considered too many
@ 2015-07-30 10:13 Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 13:49 ` Re: How Many PG_Locks are considered too many Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Renato Oliveira @ 2015-07-30 10:13 UTC (permalink / raw)
To: Forums postgresql <pgsql-general@postgresql.org>; pgsql-admin
Hi
I have few questions, if anyone could help me, it will be very much appreciated.
We have a Nagios plugin, which monitors pg_locks and almost daily we see 3000 to 40000 pg_locks.
Can we just ignore them, can we let them grow without worrying?
How many pg_locks are considered unsafe for any given postgres server?
Thank you
Renato
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How Many PG_Locks are considered too many
2015-07-30 10:13 How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
@ 2015-07-30 13:49 ` Peter Eisentraut <peter_e@gmx.net>
2015-07-30 13:57 ` Re: How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2015-07-30 13:49 UTC (permalink / raw)
To: Renato Oliveira <Renato.Oliveira@cantabcapital.com>; Forums postgresql <pgsql-general@postgresql.org>; pgsql-admin
On 7/30/15 6:13 AM, Renato Oliveira wrote:
> We have a Nagios plugin, which monitors pg_locks and almost daily we see
> 3000 to 40000 pg_locks.
>
> Can we just ignore them, can we let them grow without worrying?
>
> How many pg_locks are considered unsafe for any given postgres server?
That depends on how many concurrent clients you have and what they are
doing. Every table access will at least create a share lock of some
kind, so if you have a lot of activity that does a lot of things, you
will see a lot of locks, but that doesn't impact database performance in
a significant way.
I don't think monitoring the absolute number of locks is useful. You
might want to chart it, to compare over time. If you want to monitor
locks, you could monitor lock waits, which you can get by checking the
server log.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: How Many PG_Locks are considered too many
2015-07-30 10:13 How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 13:49 ` Re: How Many PG_Locks are considered too many Peter Eisentraut <peter_e@gmx.net>
@ 2015-07-30 13:57 ` Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 14:19 ` Re: [ADMIN] How Many PG_Locks are considered too many John Scalia <jayknowsunix@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Renato Oliveira @ 2015-07-30 13:57 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Forums postgresql <pgsql-general@postgresql.org>; pgsql-admin
Peter thank you much appreciated
Sent from my iPhone
> On 30 Jul 2015, at 14:54, Peter Eisentraut <peter_e@gmx.net> wrote:
>
>> On 7/30/15 6:13 AM, Renato Oliveira wrote:
>> We have a Nagios plugin, which monitors pg_locks and almost daily we see
>> 3000 to 40000 pg_locks.
>>
>> Can we just ignore them, can we let them grow without worrying?
>>
>> How many pg_locks are considered unsafe for any given postgres server?
>
> That depends on how many concurrent clients you have and what they are
> doing. Every table access will at least create a share lock of some
> kind, so if you have a lot of activity that does a lot of things, you
> will see a lot of locks, but that doesn't impact database performance in
> a significant way.
>
> I don't think monitoring the absolute number of locks is useful. You
> might want to chart it, to compare over time. If you want to monitor
> locks, you could monitor lock waits, which you can get by checking the
> server log.
>
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [ADMIN] How Many PG_Locks are considered too many
2015-07-30 10:13 How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 13:49 ` Re: How Many PG_Locks are considered too many Peter Eisentraut <peter_e@gmx.net>
2015-07-30 13:57 ` Re: How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
@ 2015-07-30 14:19 ` John Scalia <jayknowsunix@gmail.com>
2015-07-30 19:05 ` Re: [GENERAL] How Many PG_Locks are considered too many Merlin Moncure <mmoncure@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: John Scalia @ 2015-07-30 14:19 UTC (permalink / raw)
To: Renato Oliveira <Renato.Oliveira@cantabcapital.com>; +Cc: Peter Eisentraut <peter_e@gmx.net>; Forums postgresql <pgsql-general@postgresql.org>; pgsql-admin
Seconding Peter on this one; it's a lot more important should one of those
locks be hanging around, say for hours or days, not how many have come and
gone.
--
Jay
On Thu, Jul 30, 2015 at 8:57 AM, Renato Oliveira <
Renato.Oliveira@cantabcapital.com> wrote:
> Peter thank you much appreciated
>
> Sent from my iPhone
>
> > On 30 Jul 2015, at 14:54, Peter Eisentraut <peter_e@gmx.net> wrote:
> >
> >> On 7/30/15 6:13 AM, Renato Oliveira wrote:
> >> We have a Nagios plugin, which monitors pg_locks and almost daily we see
> >> 3000 to 40000 pg_locks.
> >>
> >> Can we just ignore them, can we let them grow without worrying?
> >>
> >> How many pg_locks are considered unsafe for any given postgres server?
> >
> > That depends on how many concurrent clients you have and what they are
> > doing. Every table access will at least create a share lock of some
> > kind, so if you have a lot of activity that does a lot of things, you
> > will see a lot of locks, but that doesn't impact database performance in
> > a significant way.
> >
> > I don't think monitoring the absolute number of locks is useful. You
> > might want to chart it, to compare over time. If you want to monitor
> > locks, you could monitor lock waits, which you can get by checking the
> > server log.
> >
>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [GENERAL] How Many PG_Locks are considered too many
2015-07-30 10:13 How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 13:49 ` Re: How Many PG_Locks are considered too many Peter Eisentraut <peter_e@gmx.net>
2015-07-30 13:57 ` Re: How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 14:19 ` Re: [ADMIN] How Many PG_Locks are considered too many John Scalia <jayknowsunix@gmail.com>
@ 2015-07-30 19:05 ` Merlin Moncure <mmoncure@gmail.com>
2015-07-31 06:34 ` Re: [GENERAL] How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
0 siblings, 1 reply; 6+ messages in thread
From: Merlin Moncure @ 2015-07-30 19:05 UTC (permalink / raw)
To: John Scalia <jayknowsunix@gmail.com>; +Cc: Renato Oliveira <Renato.Oliveira@cantabcapital.com>; Peter Eisentraut <peter_e@gmx.net>; Forums postgresql <pgsql-general@postgresql.org>; pgsql-admin
On Thu, Jul 30, 2015 at 9:19 AM, John Scalia <jayknowsunix@gmail.com> wrote:
> Seconding Peter on this one; it's a lot more important should one of those
> locks be hanging around, say for hours or days, not how many have come and
> gone.
Also, it's good to focus on *ungranted* locks. Typically the only
time I care about granted locks is to find out which process is
keeping my other process getting its lock granted.
merlin
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [GENERAL] How Many PG_Locks are considered too many
2015-07-30 10:13 How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 13:49 ` Re: How Many PG_Locks are considered too many Peter Eisentraut <peter_e@gmx.net>
2015-07-30 13:57 ` Re: How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 14:19 ` Re: [ADMIN] How Many PG_Locks are considered too many John Scalia <jayknowsunix@gmail.com>
2015-07-30 19:05 ` Re: [GENERAL] How Many PG_Locks are considered too many Merlin Moncure <mmoncure@gmail.com>
@ 2015-07-31 06:34 ` Renato Oliveira <Renato.Oliveira@cantabcapital.com>
0 siblings, 0 replies; 6+ messages in thread
From: Renato Oliveira @ 2015-07-31 06:34 UTC (permalink / raw)
To: Merlin Moncure <mmoncure@gmail.com>; +Cc: John Scalia <jayknowsunix@gmail.com>; Peter Eisentraut <peter_e@gmx.net>; Forums postgresql <pgsql-general@postgresql.org>; pgsql-admin
Thank you appreciated
Sent from my iPhone
> On 30 Jul 2015, at 20:05, Merlin Moncure <mmoncure@gmail.com> wrote:
>
>> On Thu, Jul 30, 2015 at 9:19 AM, John Scalia <jayknowsunix@gmail.com> wrote:
>> Seconding Peter on this one; it's a lot more important should one of those
>> locks be hanging around, say for hours or days, not how many have come and
>> gone.
>
> Also, it's good to focus on *ungranted* locks. Typically the only
> time I care about granted locks is to find out which process is
> keeping my other process getting its lock granted.
>
> merlin
>
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2015-07-31 06:34 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30 10:13 How Many PG_Locks are considered too many Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 13:49 ` Peter Eisentraut <peter_e@gmx.net>
2015-07-30 13:57 ` Renato Oliveira <Renato.Oliveira@cantabcapital.com>
2015-07-30 14:19 ` John Scalia <jayknowsunix@gmail.com>
2015-07-30 19:05 ` Merlin Moncure <mmoncure@gmail.com>
2015-07-31 06:34 ` Renato Oliveira <Renato.Oliveira@cantabcapital.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox