Skip site navigation (1) Skip section navigation (2)

Re: High context switches occurring

From: Sven Geisler <sgeisler(at)aeccom(dot)com>
To: Anjan Dave <adave(at)vantage(dot)com>
Cc: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Vivek Khera <vivek(at)khera(dot)org>,Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: High context switches occurring
Date: 2005-11-24 10:38:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Hi Anjan,

I can support Scott. You should turn on HT if you see high values for CS.

I do have a few customers running a web-based 3-tier application with 
PostgreSQL. We had to turn off HT to have better overall performance.
The issue is the behavior under high load. I notice that HT on does 
collapse faster.

Just a question. Which version of XEON do you have? What is does the 
server have as memory architecture.

I think, Dual-Core XEON's are no issue. One of our customers does use a 
4-way Dual-Core Opteron 875 since a few months. We have Pg 8.0.3 and it 
runs perfect. I have to say that we use a special patch from Tom which 
fix an issue with the looking of shared buffers and the Opteron.
I notice that this patch is also useful for XEON's with EMT64.

Best regards

Anjan Dave schrieb:
> Yes, it's turned on, unfortunately it got overlooked during the setup,
> and until now...!
> It's mostly a 'read' application, I increased the vm.max-readahead to
> 2048 from the default 256, after which I've not seen the CS storm,
> though it could be incidental.
> Thanks,
> Anjan
> -----Original Message-----
> From: Scott Marlowe [mailto:smarlowe(at)g2switchworks(dot)com] 
> Sent: Tuesday, November 22, 2005 3:38 PM
> To: Anjan Dave
> Cc: Tom Lane; Vivek Khera; Postgresql Performance
> Subject: Re: [PERFORM] High context switches occurring
> On Tue, 2005-11-22 at 14:33, Anjan Dave wrote:
>>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...
> Is your machine a hyperthreaded one?  Some folks have found that turning
> off hyper threading helps.  I knew it made my servers better behaved in
> the past.
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

/This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you are not the intended recipient, you should not
copy it, re-transmit it, use it or disclose its contents, but should
return it to the sender immediately and delete your copy from your
system. Thank you for your cooperation./

Sven Geisler <sgeisler(at)aeccom(dot)com> Tel +49.30.5362.1627 Fax .1638
Senior Developer,    AEC/communications GmbH    Berlin,   Germany

In response to

pgsql-performance by date

Next:From: Pailloncy Jean-GerardDate: 2005-11-24 11:54:25
Subject: Re: 8.1 count(*) distinct: IndexScan/SeqScan
Previous:From: Mark KirkwoodDate: 2005-11-24 09:26:44
Subject: Re: Hardware/OS recommendations for large databases (

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group