From: Josh Berkus <josh@agliodbs.com>
To: eudald_v <reaven.galaeindael@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Sudden connection and load average spikes with postgresql 9.3
Date: Tue, 30 Jun 2015 15:56:48 -0700
Message-ID: <55931EB0.1000003@agliodbs.com> (raw)
In-Reply-To: <WM!c7bd7562c7bece63187a13788e45741062e0d671e243b767856b62e6b994fa96ffbf6af1c5663cb27c147d6d67cd9bc5!@asav-3.01.com>
References: <1435675936590-5855895.post@n5.nabble.com>
<WM!c7bd7562c7bece63187a13788e45741062e0d671e243b767856b62e6b994fa96ffbf6af1c5663cb27c147d6d67cd9bc5!@asav-3.01.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 06/30/2015 07:52 AM, eudald_v wrote:
> Two days from now, I've been experiencing that, randomly, the connections
> rise up till they reach max connections, and the load average of the server
> goes arround 300~400, making every command issued on the server take
> forever. When this happens, ram is relatively low (70Gb used), cores
> activity is lower than usual and sometimes swap happens (I've swappiness
> configured to 10%)
As Tom said, the most likely reason for this is application behavior and
blocking locks. Try some of these queries on our scripts page:
https://github.com/pgexperts/pgx_scripts/tree/master/locks
However, I have seem some other things which cause these kinds of stalls:
* runaway connection generation by the application, due to either a
programming bug or an irresponsible web crawler (see
https://www.pgexperts.com/blog/quinn_weaver/)
* issues evicting blocks from shared_buffers: what is your
shared_buffers set to? How large is your database?
* Checkpoint stalls: what FS are you on? What are your transaction log
settings for PostgreSQL?
* Issues with the software/hardware stack around your storage, causing
total IO stalls periodically. What does IO throughput look like
before/during/after the stalls?
The last was the cause the last time I dealt with a situation like
yours; it turned out the issue was bad RAID card firmware where the card
would lock up whenever the write-through buffer got too much pressure.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.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: josh@agliodbs.com, reaven.galaeindael@gmail.com
Subject: Re: Sudden connection and load average spikes with postgresql 9.3
In-Reply-To: <55931EB0.1000003@agliodbs.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