Re: How many Cluster database on a single server

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: "d(dot)davolio(at)mastertraining(dot)it" <d(dot)davolio(at)mastertraining(dot)it>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How many Cluster database on a single server
Date: 2011-10-20 03:34:03
Message-ID: 4E9F96AB.2000002@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 10/19/2011 05:46 PM, d(dot)davolio(at)mastertraining(dot)it wrote:

> My colleagues are asking how many Cluster Databases (initdb) can I
> create and run on a single server. I mean, supposed my server has the
> resources, can I create 100 or even 200 Cluster Databases?

Yep. It won't be fast, but it'll work.

You'll have two performance problems to deal with:

- The memory, CPU and disk I/O overhead of all those extra postmasters,
bgwriters, autovacuum daemons etc running for each cluster; and

- having to split the available shared memory up between each cluster,
so no single cluster gets very much shared memory to use for shared_buffers.

If you keep your shared_buffers low, it should work just fine, but it
won't perform as well as a single PostgreSQL cluster with lots of databases.

In the future I'm hoping someone'll be enthusiastic enough to / need to
add support split WAL logging or partial replication so this sort of
thing isn't necessary. For now it does seem to be the best way to handle
cases where different databases need different replication.

--
Craig Ringer

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2011-10-20 03:44:36 Re: Heavy contgnous load
Previous Message Jeff Davis 2011-10-20 02:51:09 Re: delete/recreate indexes