Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 92F36B5DCE9 for ; Thu, 20 Oct 2011 00:34:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 54649-05-3 for ; Thu, 20 Oct 2011 03:34:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 7C154B5DCC6 for ; Thu, 20 Oct 2011 00:34:10 -0300 (ADT) Received: by vws1 with SMTP id 1so1735079vws.19 for ; Wed, 19 Oct 2011 20:34:09 -0700 (PDT) Received: by 10.52.34.83 with SMTP id x19mr9238214vdi.102.1319081649767; Wed, 19 Oct 2011 20:34:09 -0700 (PDT) Received: from ayaki.localdomain (124-169-43-32.dyn.iinet.net.au. [124.169.43.32]) by mx.google.com with ESMTPS id e4sm7664630vdt.11.2011.10.19.20.34.07 (version=SSLv3 cipher=OTHER); Wed, 19 Oct 2011 20:34:08 -0700 (PDT) Message-ID: <4E9F96AB.2000002@ringerc.id.au> Date: Thu, 20 Oct 2011 11:34:03 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: "d.davolio@mastertraining.it" CC: pgsql-performance@postgresql.org Subject: Re: How many Cluster database on a single server References: <4E9E9C82.4060400@mastertraining.it> In-Reply-To: <4E9E9C82.4060400@mastertraining.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/173 X-Sequence-Number: 45395 On 10/19/2011 05:46 PM, d.davolio@mastertraining.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