Re: Context switch storms

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Omar Kilani" <omar(dot)kilani(at)gmail(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Context switch storms
Date: 2008-12-05 22:42:03
Message-ID: 493959DB.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>> "Omar Kilani" <omar(dot)kilani(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2008-12-05 22:48:23 Re: Experience with HP Smart Array P400 and SATA drives?
Previous Message Rogatzki Rainer 2008-12-05 15:41:14 Re: Trigger function, bad performance