X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 36AE4D1B989 for ; Mon, 19 Apr 2004 03:53:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 78274-10 for ; Mon, 19 Apr 2004 03:53:07 -0300 (ADT) Received: from ms-smtp-02.tampabay.rr.com (ms-smtp-02-smtplb.tampabay.rr.com [65.32.5.132]) by svr1.postgresql.org (Postfix) with ESMTP id 71F09D1B581 for ; Mon, 19 Apr 2004 03:53:05 -0300 (ADT) Received: from Bojan (6534118hfc81.swfla.rr.com [65.34.118.81] (may be forged)) by ms-smtp-02.tampabay.rr.com (8.12.10/8.12.7) with SMTP id i3J6r382014996 for ; Mon, 19 Apr 2004 02:53:04 -0400 (EDT) From: "Bojan Belovic" To: Subject: Extremely high context switching Date: Mon, 19 Apr 2004 02:53:28 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200404/251 X-Sequence-Number: 13224 I have just moved a database to a new server and new version of Postgres (7.1.2 to 7.3.4). The new server is much more powerful (2GB RAM, 2xXeon, RAID) than the old one (1GB RAM, 1 CPU, single drive) and I would expect at least twice the performance if not more, however, it is constantly showing high load and very high context switching, even outside peak hours. Here's a portion of vmstat output: procs memory swap io system cpu r b swpd free buff cache si so bi bo in cs us sy id wa 3 0 0 128000 68040 1680488 0 0 5 23 29 17 1 0 23 1 3 0 0 128028 68040 1680488 0 0 0 0 114 242523 43 16 41 0 3 0 0 128112 68040 1680488 0 0 0 0 114 239304 42 16 41 0 4 0 0 127556 68040 1680488 0 0 0 0 166 211554 43 27 30 0 2 0 0 127476 68040 1680488 0 0 0 448 220 194517 50 14 35 1 3 0 0 127200 68040 1680488 0 0 0 0 142 190350 50 14 36 0 3 0 0 127864 68040 1680656 0 0 0 0 182 209546 55 19 26 0 3 0 0 127424 68040 1680752 0 0 0 0 162 155351 52 17 31 0 3 0 0 127856 68040 1680848 0 0 32 0 137 198027 59 18 23 0 2 0 0 127588 68040 1680920 0 0 0 548 238 220461 38 16 46 0 2 0 0 127864 68040 1680920 0 0 0 0 123 193224 27 12 61 0 1 0 0 127960 68040 1680920 0 0 0 0 135 220137 38 16 47 0 5 0 0 126472 68040 1680920 0 0 0 0 152 131971 34 9 57 0 4 0 0 127016 68040 1680920 0 0 0 0 151 45508 32 3 65 0 3 0 0 126872 68040 1680920 0 0 0 120 138 47118 31 5 64 1 1 0 0 126988 68040 1680920 0 0 0 0 142 41675 30 3 66 0 1 0 0 126860 68040 1680920 0 0 0 0 132 64751 29 4 67 0 1 0 0 126896 68040 1680920 0 0 0 0 164 43179 23 3 73 0 2 0 0 126872 68040 1680920 0 0 0 0 115 42461 24 3 74 0 1 0 0 127452 68040 1680920 0 0 0 416 153 40434 24 2 73 1 1 0 0 127436 68040 1680920 0 0 0 0 123 42127 23 4 73 0 1 1 0 127372 68040 1680960 0 0 8 0 146 74913 28 5 67 0 1 0 0 127004 68040 1681072 0 0 8 0 148 47233 26 7 67 0 1 0 0 126988 68040 1681072 0 0 0 0 123 47676 30 6 64 0 When the system is idle, cs is ok (less than 50). Is this postgres problem or a system problem? Unfortunatelly, too many parameters have changed, but I'm hoping for any sort of suggestion as to how I can fix this. Thanks, Bojan