Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8B1D29FBD4C for ; Fri, 25 May 2007 05:52:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 12131-02 for ; Fri, 25 May 2007 05:52:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id EF3419FB83E for ; Fri, 25 May 2007 05:52:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from fafnir.androme.com (fafnir.androme.com [62.58.96.158]) by svr4.postgresql.org (Postfix) with ESMTP id 65A535AF031 for ; Fri, 25 May 2007 08:52:24 +0000 (GMT) Received: by fafnir.androme.com (Postfix, from userid 1003) id 05C7EB92E08; Fri, 25 May 2007 10:52:16 +0200 (CEST) Message-ID: <4656A3BE.1070409@andromeiberica.com> Date: Fri, 25 May 2007 10:52:14 +0200 From: Arnau Reply-To: arnaulist@andromeiberica.com User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: PostgreSQL Performance Subject: How PostgreSQL handles multiple DDBB instances? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/488 X-Sequence-Number: 24878 Hi all, I have a doubt/problem about how PostgreSQL handles multiple DDBB instances running on a same server and how I should design the architecture of an application. I have an application that works with multiple customers. Thinking in scalability we are thinking in applying the following approaches: - Create a separate database instance for each customer. - We think that customer's DB will be quite small, about 200MB as average. - The number of clients, then DDBB, can be significant(thousands). - Have as many customers as possible on the same server, so a single server could have more than 300 DDBB instances. Do you think this makes sense? or taking into account that the expected DDBB size, would be better to join several customers DDBB in just one instance. What I'm worried about is, if having so many DDBB instances PostgreSQL's performance would be worse. I have been following the list and one of the advises that appears more often is keep your DB in memory, so if I have just one instance instead of "hundreds" the performance will be better? Thank you very much -- Arnau