Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id F0F979FB2AF for ; Tue, 21 Nov 2006 10:48:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 47548-01-9 for ; Tue, 21 Nov 2006 10:48:35 -0400 (AST) X-Greylist: delayed 00:35:48.341556 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B6D079FB215 for ; Tue, 21 Nov 2006 10:45:01 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from server.linux27.com (server.linux27.com [72.232.77.42]) by svr4.postgresql.org (Postfix) with ESMTP id CFD615B01A8 for ; Tue, 21 Nov 2006 12:44:06 +0000 (GMT) Received: from [201.67.134.72] (port=10165 helo=PC1) by server.linux27.com with esmtpa (Exim 4.52) id 1GmUyo-0005Sq-54; Tue, 21 Nov 2006 10:44:02 -0200 Reply-To: From: "Carlos H. Reimer" To: "Josh Berkus" , Subject: RES: Context switching Date: Tue, 21 Nov 2006 10:44:23 -0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <200611070942.26663.josh@agliodbs.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.linux27.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - opendb.com.br X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/172 X-Sequence-Number: 21942 Hi, I have not seen the iowaits numbers and yes, it is a xeon, four = processors. With the 7.4 version the problem did not exist but I think Tom Lane = cleared why this behavior with 8.0 and 8.1 versions in = http://archives.postgresql.org/pgsql-performance/2006-11/msg00050.php Reimer > -----Mensagem original----- > De: Josh Berkus [mailto:josh@agliodbs.com] > Enviada em: ter=C3=A7a-feira, 7 de novembro de 2006 15:42 > Para: pgsql-performance@postgresql.org; carlos.reimer@opendb.com.br > Assunto: Re: [PERFORM] Context switching >=20 >=20 > Carlos, >=20 > > We've migrated one of our servers from pg 7.4 to 8.1 and from times = to > > times (4 hours) the server start doing a lot of context=20 > switching and all > > transactions become very slow. > > > > The average context switching for this server as vmstat shows=20 > is 1 but when > > the problem occurs it goes to 250000. >=20 > Context Switching is a symptom rather than a cause. What's most = likely=20 > happening is that you have a combined heavy-CPU and heavy-IO=20 > workload, so you=20 > have bursts of CPU activity stalled by iowaits. >=20 > Can you check the rate of iowaits during the "storm" periods? >=20 > Also, is this Xeon? And are you saying that you *didn't* have=20 > this issue=20 > under 7.4? >=20 > --=20 > Josh Berkus > PostgreSQL @ Sun > San Francisco >=20 >=20