Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6E6846329B6 for ; Mon, 29 Mar 2010 14:25:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90383-09 for ; Mon, 29 Mar 2010 17:24:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mail.postgresql.org (Postfix) with ESMTP id D0B1C632269 for ; Mon, 29 Mar 2010 14:24:58 -0300 (ADT) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Mh8jt-1O9ixd3oRN-00MPxN; Mon, 29 Mar 2010 19:24:57 +0200 Message-ID: <4BB0E267.3030804@2ndquadrant.com> Date: Mon, 29 Mar 2010 13:24:55 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Ramiro Barreca CC: pgsql-admin@postgresql.org Subject: Re: Virtualization vs. sharing a server References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/nYi5qMiUtEQM1Jm949fPc65rXHq0e9oLG5J8 A4gOKn9as5uK01SHB6JRiHCinKNVqCzc8dcPbqf5jkFnooEU0g 4Zj51oz0yqwsXU3XZZz2HW9EcD9aK3Q X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201003/231 X-Sequence-Number: 34030 Ramiro Barreca wrote: > > 1. Is there a configuration option we need to consider to share > this server? > The two main configuration options that impact how much RAM PostgreSQL uses are shared_buffers and work_mem. If the server is shared, you just need to avoid tuning those upwards as far as you would on a dedicated system. The defaults for both are tiny, so unless you've already pushed these upwards a lot you're unlikely to have any issues in an initial deployment. > 1. What is the recomended hardware for a PostgreSQL server that has > to support between 500 and 1000 simultaneous user connections? > Is there a whitepaper about this? > The recommendation is "try not to do that". PostgreSQL connections are fairly expensive, and scaling into hundreds of connections on a single system tends to break down due to connection creation/teardown overhead. You should be investigating a connection pooler to put in between the application and the database, limiting the number of connections to something much smaller. PgBouncer is most people's first choice for this scale of database: http://pgfoundry.org/projects/pgbouncer Once you've gotten past that issue, recommended hardware varies greatly depending on workload. Read vs. write balance? Size of the critical working set in RAM? Size of the database? Peak commit rate? Types of queries executed by the application? It all factors into the decision. Add in business requirements for reliability and the inevitable vendor preference, you're likely to end up with a stack of possible configurations you could consider to sort through. There is no generic recommendation for larger systems. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us