X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02F448B9F83 for ; Wed, 9 Feb 2005 14:26:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00984-01 for ; Wed, 9 Feb 2005 14:26:43 +0000 (GMT) Received: from m-monitor.net (unknown [207.44.134.28]) by svr1.postgresql.org (Postfix) with ESMTP id EBEA98B9B26 for ; Wed, 9 Feb 2005 14:26:45 +0000 (GMT) Received: (qmail 18997 invoked from network); 9 Feb 2005 14:26:46 -0000 Received: from 203-173-49-188.dyn.iinet.net.au (HELO ?127.0.0.1?) (203.173.49.188) by ev1s-207-44-134-28.ev1servers.net with SMTP; 9 Feb 2005 14:26:45 -0000 Message-ID: <420A1D9B.1040801@meerkatsoft.com> Date: Thu, 10 Feb 2005 01:26:35 +1100 From: Alex User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: How can I make use of both CPUs in a dual processor machine Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/136 X-Sequence-Number: 10465 Hi, we just got a new dual processor machine and I wonder if there is a way to utilize both processors. Our DB server is basically fully dedicated to postgres. (its a dual amd with 4gb mem.) I have a batch job that periodically loads about 8 million records into a table. for this I drop the indices, truncate the table, use the copy to insert the data, recreate the indices (4 indices), vacuum the table. That is all done through a perl batch job. While I am doing this, I noticed that only one CPU is really used. So here are my questions: Is there a way to utilize both CPUs Is it possible to split up the import file and run 2 copy processes Is it possible to create 2 indices at the same time Would I actually gain anything from that, or is the bottleneck somewhere else ? (perl is a given here for the batch job) If anyone has some experience or ideas... any hints or help on this would be appreciated. Thanks Alex