Re: Context switch storms - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Context switch storms
Date
Msg-id 493959DB.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Context switch storms  ("Omar Kilani" <omar.kilani@gmail.com>)
List pgsql-performance
>>> "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

pgsql-performance by date:

Previous
From: "Rogatzki Rainer"
Date:
Subject: Re: Trigger function, bad performance
Next
From: "Kevin Grittner"
Date:
Subject: Re: Experience with HP Smart Array P400 and SATA drives?