Re: [PERFORM] High context switches occurring

2005-12-20 Thread Tom Lane
Oleg Bartunov oleg@sai.msu.su writes: I see a very low performance and high context switches on our dual itanium2 slackware box (Linux ptah 2.6.14 #1 SMP) with 8Gb of RAM, running 8.1_STABLE. Any tips here ? [EMAIL PROTECTED]:~/cvs/8.1/pgsql/contrib/pgbench$ time pgbench -s 10 -c 10 -t 3000

Re: [PERFORM] High context switches occurring

2005-12-19 Thread Anjan Dave
Message- From: Anjan Dave Sent: Wed 12/7/2005 10:54 AM To: Tom Lane Cc: Vivek Khera; Postgresql Performance Subject: Re: [PERFORM] High context switches occurring Thanks for your inputs, Tom. I was going after high

Re: [PERFORM] High context switches occurring

2005-12-19 Thread Juan Casero
Subject: Re: [PERFORM] High context switches occurring Thanks for your inputs, Tom. I was going after high concurrent clients, but should have read this carefully - -s scaling_factor this should be used with -i (initialize) option

Re: [PERFORM] High context switches occurring

2005-12-19 Thread Oleg Bartunov
To: Tom Lane Cc: Vivek Khera; Postgresql Performance Subject: Re: [PERFORM] High context switches occurring Thanks for your inputs, Tom. I was going after high concurrent clients, but should have read this carefully - -s scaling_factor

Re: [PERFORM] High context switches occurring

2005-12-19 Thread Jignesh K. Shah
Subject: Re: [PERFORM] High context switches occurring Thanks for your inputs, Tom. I was going after high concurrent clients, but should have read this carefully - -s scaling_factor this should be used with -i (initialize) option. number

Re: [PERFORM] High context switches occurring

2005-12-11 Thread Tatsuo Ishii
Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: 1. You don't want number of clients (-c) much higher than scaling factor (-s in the initialization step). Should we throw a warning when someone runs the test this way? Not a bad idea (though of course only for the standard

Re: [PERFORM] High context switches occurring

2005-12-07 Thread Anjan Dave
contention. I'll rerun the tests. Thanks, Anjan -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 6:45 PM To: Anjan Dave Cc: Vivek Khera; Postgresql Performance Subject: Re: [PERFORM] High context switches occurring Anjan Dave [EMAIL PROTECTED

Re: [PERFORM] High context switches occurring

2005-12-07 Thread Scott Marlowe
On Tue, 2005-12-06 at 22:49, Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: 1. You don't want number of clients (-c) much higher than scaling factor (-s in the initialization step). Should we throw a warning when someone runs the test this way? Not a bad

Re: [PERFORM] High context switches occurring

2005-12-06 Thread Anjan Dave
] Sent: Tuesday, November 22, 2005 2:42 PM To: Anjan Dave Cc: Vivek Khera; Postgresql Performance Subject: Re: [PERFORM] High context switches occurring Anjan Dave [EMAIL PROTECTED] writes: Would this problem change it's nature in any way on the recent Dual-Core Intel XEON MP machines? Probably

Re: [PERFORM] High context switches occurring

2005-12-06 Thread Vivek Khera
On Dec 6, 2005, at 2:04 PM, Anjan Dave wrote: interestingly, it was experiencing 3x more context switches than the Intel box (upto 100k, versus ~30k avg on Dell). Both are RH4.0 I'll assume that's context switches per second... so for the opteron that's 6540 cs's and for the Dell

Re: [PERFORM] High context switches occurring

2005-12-06 Thread Tom Lane
Anjan Dave [EMAIL PROTECTED] writes: -bash-3.00$ time pgbench -c 1000 -t 30 pgbench starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 1000 number of transactions per client: 30 number of transactions actually processed: 3/3 tps =

Re: [PERFORM] High context switches occurring

2005-12-06 Thread Bruce Momjian
Tom Lane wrote: Anjan Dave [EMAIL PROTECTED] writes: -bash-3.00$ time pgbench -c 1000 -t 30 pgbench starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 1000 number of transactions per client: 30 number of transactions actually processed:

Re: [PERFORM] High context switches occurring

2005-12-06 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: 1. You don't want number of clients (-c) much higher than scaling factor (-s in the initialization step). Should we throw a warning when someone runs the test this way? Not a bad idea (though of course only for the standard

Re: [PERFORM] High context switches occurring

2005-11-24 Thread Sven Geisler
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

Re: [PERFORM] High context switches occurring

2005-11-23 Thread Simon Riggs
On Tue, 2005-11-22 at 18:17 -0500, Anjan Dave wrote: 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. Can you verify this, please? Turn it back down again, try the test,

Re: [PERFORM] High context switches occurring

2005-11-23 Thread Anjan Dave
, 2005 1:14 PM To: Anjan Dave Cc: Scott Marlowe; Tom Lane; Vivek Khera; Postgresql Performance Subject: Re: [PERFORM] High context switches occurring On Tue, 2005-11-22 at 18:17 -0500, Anjan Dave wrote: It's mostly a 'read' application, I increased the vm.max-readahead to 2048 from the default 256

Re: [PERFORM] High context switches occurring

2005-11-23 Thread Anjan Dave
1:33 PM To: Simon Riggs Cc: Scott Marlowe; Tom Lane; Vivek Khera; Postgresql Performance Subject: Re: [PERFORM] High context switches occurring The offending SELECT query that invoked the CS storm was optimized by folks here last night, so it's hard to say if the VM setting made a difference. I'll

[PERFORM] High context switches occurring

2005-11-22 Thread Anjan Dave
Hi, One of our PG server is experiencing extreme slowness and there are hundreds of SELECTS building up. I am not sure if heavy context switching is the cause of this or something else is causing it. Is this pretty much the final word on this issue?

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Vivek Khera
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

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Tom Lane
Vivek Khera [EMAIL PROTECTED] 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

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Anjan Dave
Cc: Postgresql Performance; Anjan Dave Subject: Re: [PERFORM] High context switches occurring Vivek Khera [EMAIL PROTECTED] 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

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Tom Lane
Anjan Dave [EMAIL PROTECTED] writes: Would this problem change it's nature in any way on the recent Dual-Core Intel XEON MP machines? Probably not much. There's some evidence that Opterons have less of a problem than Xeons in multi-chip configurations, but we've seen CS thrashing on Opterons

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Anjan Dave
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

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Scott Marlowe
P.s., followup to my last post, I don't know if turning of HT actually lowered the number of context switches, just that it made my server run faster. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Scott Marlowe
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,

Re: [PERFORM] High context switches occurring

2005-11-22 Thread Anjan Dave
- From: Scott Marlowe [mailto:[EMAIL PROTECTED] 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