X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 80C163A18AA for ; Tue, 18 Jan 2005 15:45:00 +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 28552-09 for ; Tue, 18 Jan 2005 15:44:46 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 545093A199E for ; Tue, 18 Jan 2005 15:44:49 +0000 (GMT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 18 Jan 2005 09:44:50 -0600 Subject: Re: run httpd and postgresql on different machines ? From: Scott Marlowe To: chen@musc.edu Cc: pgsql-admin@postgresql.org In-Reply-To: <41ED10E2.6030502@musc.edu> References: <41ED10E2.6030502@musc.edu> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1106063090.23377.5.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 18 Jan 2005 09:44:50 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/191 X-Sequence-Number: 16050 On Tue, 2005-01-18 at 07:36, Chuming Chen wrote: > Hi, all, > > I want to set up a web site using apache httpd, php and postgresql. From > the performance point of view, which architecture is better? 1) Run > httpd and postgresql on the same machine; 2) Run postgresql on seperate > machine. My concern is that the machine I am going to run httpd has > limitted storage. I am expecting the increasing of postgresql database > once I set it ip. > > Any suggestions and comments will be highly appreciated. It really depends on whether apache/php and postgresql are going to be fighting for the same resources. apache/php tends to be CPU intensive, while PostgreSQL tends to be I/O intensive. It might be more economical to simply upgrade the I/O subsystem on the one machine to be bigger and faster than to build a whole other machine. On the other hand, setting it up on two machines allows you to configure each one as the other's fail over so you can improve your reliability and performance.