Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BAB8B632795 for ; Fri, 25 Jun 2010 19:26:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 34119-09 for ; Fri, 25 Jun 2010 22:26:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.eldocomp.com (winex2.eldocomp.com [205.159.99.53]) by mail.postgresql.org (Postfix) with ESMTP id 16240632621 for ; Fri, 25 Jun 2010 19:26:02 -0300 (ADT) Received: from WINEX1.eldocomp.com ([fe80::4020:f5e6:ce9:1af]) by winex2.eldocomp.com ([::1]) with mapi; Fri, 25 Jun 2010 15:25:39 -0700 From: Deborah Fuentes To: Deborah Fuentes , "pgsql-performance@postgresql.org" Subject: Extremely high CPU usage when building tables Thread-Topic: Extremely high CPU usage when building tables Thread-Index: AQHLFLVWfxD9DuXH80aHCIzmpUV3ww== Date: Fri, 25 Jun 2010 22:25:41 +0000 Message-ID: <306A7ABFF569E847BC99BA08C183EFF3ED95@WINEX1.eldocomp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/2 X-Sequence-Number: 39391 Hello, When I run an SQL to create new tables and indexes is when Postgres consume= s all CPU and impacts other users on the server. We are running Postgres 8.3.7 on a Sun M5000 with 2 x quad core CPUs (16 th= reads) running Solaris 10. I've attached the sar data at the time of the run- here's a snip-it below. Any ideas would be greatly appreciated. Thanks! Deb **************************************************** Here, note the run queue, the left column. That is the number of processes = waiting to run. 97 processes waiting to run at any time with only eight CPU= cores looks very busy.=20 root@core2 # sar -q 5 500 SunOS core2 5.10 Generic_142900-11 sun4u 06/17/2010 12:01:50 runq-sz %runocc swpq-sz %swpocc 12:01:55 1.8 80 0.0 0 12:02:00 1.0 20 0.0 0 12:02:05 1.0 20 0.0 0 12:02:10 0.0 0 0.0 0 12:02:15 0.0 0 0.0 0 12:02:21 3.3 50 0.0 0 12:02:26 1.0 20 0.0 0 12:02:31 1.0 60 0.0 0 12:02:36 1.0 20 0.0 0 12:02:42 27.0 50 0.0 0 12:02:49 32.8 83 0.0 0 12:02:55 76.0 100 0.0 0 12:03:01 66.1 100 0.0 0 12:03:07 43.8 100 0.0 0 12:03:13 52.0 100 0.0 0 12:03:19 91.2 100 0.0 0 12:03:26 97.8 83 0.0 0 12:03:33 63.7 100 0.0 0 12:03:39 67.4 100 0.0 0 12:03:47 41.5 100 0.0 0 12:03:53 82.0 83 0.0 0 12:03:59 88.7 100 0.0 0 12:04:06 87.7 50 0.0 0 12:04:12 41.3 100 0.0 0 12:04:17 94.3 50 0.0 0 12:04:22 1.0 20 0.0 0 12:04:27 3.3 60 0.0 0 12:04:32 1.0 20 0.0 0 12:04:38 0.0 0 0.0 0