pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: arnaulist@andromeiberica.com
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: How PostgreSQL handles multiple DDBB instances?
Date: Fri, 25 May 2007 10:24:40 -0400
Message-ID: <8684.1180103080@sss.pgh.pa.us> (raw)
In-Reply-To: <4656A3BE.1070409@andromeiberica.com>
References: <4656A3BE.1070409@andromeiberica.com>

Arnau <arnaulist@andromeiberica.com> writes:
>    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.

This is probably a bad idea, unless each customer's performance demands
are so low that you can afford to use very small shared-memory settings
for each instance.  But even small settings will probably eat ~10MB per
instance --- can you afford to build these machines with multiple GB of
RAM?

Can you instead run things with one postmaster per machine and one
database per customer within that instance?  From a performance
perspective this is likely to work much better.

If you desire to give the customers database-superuser capability then
this probably won't do, but if they are restricted users it might be OK.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <8684.1180103080@sss.pgh.pa.us>
Permalink:  ../8684.1180103080@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8684.1180103080@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, arnaulist@andromeiberica.com
  Subject: Re: How PostgreSQL handles multiple DDBB instances?
  In-Reply-To: <8684.1180103080@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox