From: Greg Smith <gsmith@gregsmith.com>
To: Joe Uhl <joeuhl@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: High CPU Utilization
Date: Tue, 17 Mar 2009 00:12:42 -0400 (EDT)
Message-ID: <alpine.GSO.2.01.0903170008130.5259@westnet.com> (raw)
In-Reply-To: <F161EF4F-4B72-47AC-A894-C1C1BE7B7E1A@gmail.com>
References: <8609D1C0-3ECD-4A4F-B9C6-1FC8496EDC7A@gmail.com>
<200903161252.22202@hal.medialogik.com>
<5F9840B1-D080-4F3A-81D4-57E8F1DB0955@gmail.com>
<alpine.GSO.2.01.0903161621230.3428@westnet.com>
<F161EF4F-4B72-47AC-A894-C1C1BE7B7E1A@gmail.com>
On Mon, 16 Mar 2009, Joe Uhl wrote:
> Now when I run vmtstat 1 30 it looks very different (below).
That looks much better. Obviously you'd like some more headroom on the
CPU situation than you're seeing, but that's way better than having so
much time spent waiting for I/O.
> max_connections = 1000
> work_mem = 30MB
Be warned that you need to be careful with this combination. If all 1000
connections were to sort something at once, you could end up with >30GB
worth of RAM used for that purpose. It's probably quite unlikely that
will happen, but 30MB is on the high side with that many connections.
I wonder if your pool might work better, in terms of lowering total CPU
usage, if you reduced the number of incoming connections. Each connection
adds some overhead and now that you've got the I/O situation under better
control you might get by with less simultaneous ones. Something to
consider.
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
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: gsmith@gregsmith.com, joeuhl@gmail.com
Subject: Re: High CPU Utilization
In-Reply-To: <alpine.GSO.2.01.0903170008130.5259@westnet.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