Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 9E8944765C5 for ; Thu, 2 May 2002 11:31:06 -0400 (EDT) Received: from files.kinesis-cem.com (Mail.Kinesis-CEM.com [64.81.9.230]) by postgresql.org (Postfix) with ESMTP id BDF394764BA for ; Thu, 2 May 2002 10:29:17 -0400 (EDT) Received: from pdarley (pdarley [192.168.1.12] (may be forged)) (authenticated bits=0) by files.kinesis-cem.com (8.12.2/8.12.2) with ESMTP id g42EFF04018873 for ; Thu, 2 May 2002 07:15:15 -0700 From: "Peter Darley" To: "Pgsql-Admin" Subject: Process balancing on smp db server/apache web server Date: Thu, 2 May 2002 07:28:08 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Importance: Normal X-Archive-Number: 200205/7 X-Sequence-Number: 4182 Friends, I have been thinking about my smp db server and how it interacts with my web server. I'm using mod_perl on Apache, which uses Apache::DBI to connect to the db server via a private network segment. It occurs to me that since the web server is connecting early (on startup), when there is probably no load on the db server, the cpu that each backend is assigned to will be largely random, or, if there is a large syslogd operation or something right at that time, it might even put the majority of backends on the same processor. When someone hits the web site it seems to me that there would be a greater than 50% chance that any large queries from the web server would end up being run on the same processor. Similarly, if I start a large processing script that uses the db, since the web associated backends are already assigned to a processor, there's a good (~50%?) chance that any big queries that come in through the web will be on the loaded cpu. Does this make sense to anyone? If this is true, are there any suggestions about how I can keep my persistent connections from Apache, while getting the db server to balance the load more efficiently? Thanks, Peter Darley