Re: High context switches occurring

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

I ran a bit exhaustive pgbench on 2 test machines I have (quad dual core
Intel and Opteron). Ofcourse the Opteron was much faster, but
interestingly, it was experiencing 3x more context switches than the
Intel box (upto 100k, versus ~30k avg on Dell). Both are RH4.0
64bit/PG8.1 64bit.

Sun (v40z):
-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: 30000/30000
tps = 45.871234 (including connections establishing)
tps = 46.092629 (excluding connections establishing)

real 10m54.240s
user 0m34.894s
sys 3m9.470s

Dell (6850):
-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: 30000/30000
tps = 22.088214 (including connections establishing)
tps = 22.162454 (excluding connections establishing)

real 22m38.301s
user 0m43.520s
sys 5m42.108s

Thanks,
Anjan

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
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" <adave(at)vantage(dot)com> 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
too. I think the issue is probably there to some extent in any modern
SMP architecture.

regards, tom lane

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Vivek Khera 2005-12-06 19:25:56 Re: High context switches occurring
Previous Message Vivek Khera 2005-12-06 18:33:37 Re: postgresql performance tuning