X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A74DF9FA434 for ; Wed, 19 Jul 2006 04:33:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 04943-05 for ; Wed, 19 Jul 2006 07:33:39 +0000 (UTC) X-Greylist: delayed 01:53:29.505065 by SQLgrey- Received: from ns2.nec.com.au (ns2.nec.com.au [147.76.180.2]) by postgresql.org (Postfix) with ESMTP id B07A89FA430 for ; Wed, 19 Jul 2006 04:33:38 -0300 (ADT) Received: from smtp1.nec.com.au (unknown [172.31.8.18]) by ns2.nec.com.au (Postfix) with ESMTP id 6473D3B6AC for ; Wed, 19 Jul 2006 17:33:36 +1000 (EST) Received: from eddy (eddy.ssd.neca.nec.com.au [147.76.48.116]) by warp.ssd.neca.nec.com.au (8.12.10+Sun/8.12.10) with SMTP id k6J7XZuP026197; Wed, 19 Jul 2006 17:33:35 +1000 (EST) Reply-To: From: "Guoping Zhang" To: "'Florian Weimer'" Cc: Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance? Date: Wed, 19 Jul 2006 17:33:34 +1000 Message-ID: <003501c6ab05$a4978f20$74304c93@eddy> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <82irlu2jk9.fsf@mid.bfk.de> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/191 X-Sequence-Number: 20051 Hi, Florian Thanks for pointing me the cause, but we simply cannot use the COPY FROM solution. Currently, our application service is running with its own dedicated local database, IF Feasible, we want to separate the application services out of database server and run SEVERAL instances of applation serivice on its own server (one per server), and make them all shall one database server. This helps to the scalability and also reduce the device cost as only database server would need mirror/backup/UPS etc. Obviously, if there is no better solution, the TCP round trip penalty will stop us doing so as we do have performance requirement. I guess there shall be quite number of people out there facing the similar problem, right? No alternative solution? Regards, Guoping Zhang -----Original Message----- From: Florian Weimer [mailto:fweimer@bfk.de] Sent: 2006Ae7OA19EO 16:30 To: guoping.zhang@nec.com.au Cc: pgsql-performance@postgresql.org; Guoping Zhang (E-mail) Subject: Re: [PERFORM] Performance penalty for remote access of postgresql (8.1.3)? any experiance? * Guoping Zhang: > a) Anyone has the similar experience? How do you deal with it? > b) Why TCP stack imposes such big delay? any tuning point I shall do? If you use INSERT, you'll incur a network round-trip delay for each record. Try using COPY FROM instead, possibly to a temporary table if you need more complex calculations. If you do this, there won't be a huge difference between local and remote access as long as the bandwidth is sufficient. -- Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Durlacher Allee 47 tel: +49-721-96201-1 D-76131 Karlsruhe fax: +49-721-96201-99