X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 96F8AD1D283 for ; Mon, 2 Feb 2004 19:18:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 48132-05 for ; Mon, 2 Feb 2004 15:18:24 -0400 (AST) Received: from mail.ez3pl.com (66-136-75-131.ded.swbell.net [66.136.75.131]) by svr1.postgresql.org (Postfix) with ESMTP id 91966D1B4B7 for ; Mon, 2 Feb 2004 15:18:17 -0400 (AST) Received: from kbarnard ([172.25.96.149]) by mail.ez3pl.com (8.11.2/8.11.2) with ESMTP id i12JHEo06728 for ; Mon, 2 Feb 2004 13:17:14 -0600 From: "Kevin Barnard" To: pgsql-performance@postgresql.org Date: Mon, 02 Feb 2004 13:14:15 -0600 MIME-Version: 1.0 Subject: Increasing number of PG connections. Message-ID: <401E4D27.26927.3254D8C1@localhost> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/10 X-Sequence-Number: 5534 I am running a Dual Xeon hyperthreaded server with 4GB RAM RAID-5. The only thing running on the server is Postgres running under Fedora. I have a 700 connection limit. The DB is setup as a backend for a very high volume website. Most of the queries are simple, such as logging accesses, user login verification etc. There are a few bigger things suchas reporting etc but for the most part each transaction lasts less then a second. The connections are not persistant (I'm using pg_connect in PHP) The system was at 2 GB with a 400 connection limit. We ran into problems because we hit the limit of connections during high volume. 1. Does 400 connections sound consistant with the 2GB of RAM? Does 700 sound good with 4 GB. I've read a little on optimizing postgres. Is there anything else I can do maybe OS wise to increase how many connections I get before I start swapping? 2. Are there any clustering technologies that will work with postgres? Specifically I'm looking at increasing the number of connections. The bottom line is since the website launched (middle of January) we have increased the number of http connections, and increased bandwidth allowances by over 10 times. The site continues to grow and we are looking at our options. Some of the ideas have been possible DB replication. Write to master and read from multiple slaves. Other ideas including increasing hardware. This is the biggest site I have ever worked with. Almost everything else fits in a T1 with a single DB server handling multiple sites. Does anybody with experence in this realm have any suggestions? Thank you in advance for whatever help you can provide. -- Kevin Barnard