Re: High context switches occurring

From: "Anjan Dave" <adave(at)vantage(dot)com>
To: "Anjan Dave" <adave(at)vantage(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Vivek Khera" <vivek(at)khera(dot)org>
Cc: "Postgresql Performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: High context switches occurring
Date: 2005-11-22 20:33:26
Message-ID: 4BAFBB6B9CC46F41B2AD7D9F4BBAF785098E76@vt-pe2550-001.vantage.vantage.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Is there any way to get a temporary relief from this Context Switching
storm? Does restarting postmaster help?

It seems that I can recreate the heavy CS with just one SELECT
statement...and then when multiple such SELECT queries are coming in,
things just get hosed up until we cancel a bunch of queries...

Thanks,
Anjan

-----Original Message-----
From: Anjan Dave
Sent: Tuesday, November 22, 2005 2:24 PM
To: Tom Lane; Vivek Khera
Cc: Postgresql Performance
Subject: Re: [PERFORM] High context switches occurring

Thanks, guys, I'll start planning on upgrading to PG8.1

Would this problem change it's nature in any way on the recent Dual-Core
Intel XEON MP machines?

Thanks,
Anjan

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, November 22, 2005 12:36 PM
To: Vivek Khera
Cc: Postgresql Performance; Anjan Dave
Subject: Re: [PERFORM] High context switches occurring

Vivek Khera <vivek(at)khera(dot)org> writes:
> On Nov 22, 2005, at 11:59 AM, Anjan Dave wrote:
>> This is a Dell Quad XEON. Hyperthreading is turned on, and I am
>> planning to turn it off as soon as I get a chance to bring it down.

> You should probably also upgrade to Pg 8.0 or newer since it is a
> known problem with XEON processors and older postgres versions.
> Upgrading Pg may solve your problem or it may not.

PG 8.1 is the first release that has a reasonable probability of
avoiding heavy contention for the buffer manager lock when there
are multiple CPUs. If you're going to update to try to fix this,
you need to go straight to 8.1.

I've recently been chasing a report from Rob Creager that seems to
indicate contention on SubTransControlLock, so the slru code is
likely to be our next bottleneck to fix :-(

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2005-11-22 20:37:47 Re: High context switches occurring
Previous Message Tom Lane 2005-11-22 19:41:40 Re: High context switches occurring