Skip site navigation (1) Skip section navigation (2)

Re: How PostgreSQL handles multiple DDBB instances?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: arnaulist(at)andromeiberica(dot)com
Cc: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: How PostgreSQL handles multiple DDBB instances?
Date: 2007-05-25 14:24:40
Message-ID: 8684.1180103080@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Arnau <arnaulist(at)andromeiberica(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2007-05-25 14:28:38
Subject: Re: Big problem with sql update operation
Previous:From: Tom LaneDate: 2007-05-25 14:18:45
Subject: Re: Performance Problem with Vacuum of bytea table (PG 8.0.13)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group