From: Kevin Grittner <kgrittn@ymail.com>
To: Moreno Andreo <moreno.andreo@evolu-s.it>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: How to find the culprit in server load spikes?
Date: Wed, 22 Jul 2015 16:40:55 +0000 (UTC)
Message-ID: <969868879.490578.1437583255126.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <55AF91A8.70904@evolu-s.it>
References: <55AF91A8.70904@evolu-s.it>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Moreno Andreo <moreno.andreo@evolu-s.it> wrote:
> I host a Postgresql server on Ubuntu 12.04 and I am facing server
> load spikes (if I run top, it goes up to 25-30 on a 4-core system)...
> In some cases, I have to restart potgresql service because users call us
> complaining of the slowness, but in some cases I can leave things on
> their way and I see that after a bunch of minutes (about 5-10) the
> situations drops to the normality (0.50-2 load).
>
> The problem is, as in the most cases, the I/O,
If you have confirmed that there is an I/O glut during these
episodes, it is probably that a cascade of dirty cache pages
caused the OS dirty pages to hit the vm.dirty_ratio percentage. If
you were seeing a high number for system CPU time the below would
probably not help.
Make sure you are using a storage system that has a persistent
cache configured for write-back (rather than write-through).
Reduce the OS vm.dirty_background_bytes setting to less than the
size of the persistent write cache. Make sure that vm.dirty_ratio
is at least 20, possibly higher. Configure the PostgreSQL
background writer to be more aggressive. If those don't do it,
reduce the size of shared_buffers.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
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: kgrittn@ymail.com, moreno.andreo@evolu-s.it
Subject: Re: How to find the culprit in server load spikes?
In-Reply-To: <969868879.490578.1437583255126.JavaMail.yahoo@mail.yahoo.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