Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 127B61337B61 for ; Mon, 13 Dec 2010 17:04:06 -0400 (AST) 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 66057-04 for ; Mon, 13 Dec 2010 21:03:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ix1.inomial.com (ix1.inomial.com [202.62.137.4]) by mail.postgresql.org (Postfix) with ESMTP id 073BA1336FA7 for ; Mon, 13 Dec 2010 17:03:57 -0400 (AST) Received: from [192.168.1.78] (ip-143.29.92.203.VOCUS.net.au [203.92.29.143]) by ix1.inomial.com (Postfix) with ESMTPA id 4C1EE19240AE; Tue, 14 Dec 2010 08:03:55 +1100 (EST) Subject: Re: CPU bound Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Royce Ausburn In-Reply-To: <4D066D0E.6070405@agliodbs.com> Date: Tue, 14 Dec 2010 08:03:54 +1100 Cc: pgsql-performance@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <7F2CF023-C154-4F7F-9373-2470D4553096@inomial.com> References: <4D066D0E.6070405@agliodbs.com> To: Josh Berkus , Craig Ringer X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/168 X-Sequence-Number: 41620 Thanks guys - interesting. =20 On 14/12/2010, at 5:59 AM, Josh Berkus wrote: > On 12/12/10 6:43 PM, Royce Ausburn wrote: >> Hi all, >>=20 >> I notice that when restoring a DB on a laptop with an SDD, typically = postgres is maxing out a CPU - even during a COPY. I wonder, what is = postgres usually doing with the CPU? I would have thought the disk = would usually be the bottleneck in the DB, but occasionally it's not. = We're embarking on a new DB server project and it'd be helpful to = understand where the CPU is likely to be the bottleneck. >=20 > That's pretty normal; as soon as you get decent disk, especially > something like an SSD with a RAM cache, you become CPU-bound. COPY = does > a LOT of parsing and data manipulation. Index building, of course, is > almost pure CPU if you have a decent amount of RAM available. >=20 > If you're restoring from a pg_dump file, and have several cores > available, I suggest using parallel pg_restore. >=20 >=20 > --=20 > -- Josh Berkus > PostgreSQL Experts Inc. > http://www.pgexperts.com >=20 > --=20 > Sent via pgsql-performance mailing list = (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance