From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Omar Kilani <omar.kilani@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Context switch storms
Date: Fri, 05 Dec 2008 16:42:03 -0600
Message-ID: <493959DB.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <f0cc3e3e0812020051s16252725h1e8759b1cf342e02@mail.gmail.com>
References: <f0cc3e3e0812020051s16252725h1e8759b1cf342e02@mail.gmail.com>
>>> "Omar Kilani" <omar.kilani@gmail.com> wrote:
> During CS storm:
> count(*) from pg_locks - 1000 - 1400
What do you have for max_connections?
With the hardware and load you describe, I would guess you would limit
context switching and see best performance with a connection pool that
queues requests, keeping the actual connections to the database around
30. You only have so many resources available; having a large number
of queries all contending for them is less efficient than having just
enough queries active to keep them all busy. I have typically seen
the plateau fall off to degradation at or before (CPU count * 2) +
(spindle count).
-Kevin
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: Kevin.Grittner@wicourts.gov, omar.kilani@gmail.com
Subject: Re: Context switch storms
In-Reply-To: <493959DB.EE98.0025.0@wicourts.gov>
* 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