From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Soni M <diptatapa@gmail.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: slow server : s_lock and _bt_checkkeys on perf top
Date: Thu, 5 Mar 2015 19:29:26 -0600
Message-ID: <54F902F6.6040608@BlueTreble.com> (raw)
In-Reply-To: <CAAMgDX=xTxCV0DMTt5VYGus-LO=1n9wNO7RQni0yvWmbVgD-kQ@mail.gmail.com>
References: <CAAMgDX=xTxCV0DMTt5VYGus-LO=1n9wNO7RQni0yvWmbVgD-kQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 3/4/15 1:31 PM, Soni M wrote:
> Hello All,
>
> Master db size 1.5 TB
> All postgres 9.1.13 installed from RHEL package.
> It has streaming replica and slony replica to another servers.
>
> Server performance is slower than usual, before that, there's a big
> query got cancelled and then performance get slow.
>
> No sign of IO wait.
>
> on sar, it's %user and %system dominate the cpu usage
> 01:25:04 PM CPU %user %nice %system %iowait %steal
> %idle
> Average: all 51.91 0.00 12.03 0.66 0.00
> 35.39
>
> on perf top, i saw
> 18.93% postgres [.] s_lock
> 10.72% postgres [.] _bt_checkkeys
> almost always at top.
_bt_checkkeys is the function that compares a row in a btree index to a
condition. s_lock is a spinlock; the high CPU usage in there indicates
there's heavy lock contention somewhere.
Is there one PG process that's clearly using more CPU than the others?
What else is running in the database? Are there any unusual data types
involved?
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: Jim.Nasby@BlueTreble.com, diptatapa@gmail.com
Subject: Re: slow server : s_lock and _bt_checkkeys on perf top
In-Reply-To: <54F902F6.6040608@BlueTreble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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