Re: tuning on ec2

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Joel Reymont <joelr1(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tuning on ec2
Date: 2011-04-26 15:42:51
Message-ID: BANLkTimnWOcft2BWB_sDEnWS0HhvjEaKEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 26, 2011 at 9:34 AM, Joel Reymont <joelr1(at)gmail(dot)com> wrote:
>
> On Apr 26, 2011, at 4:31 PM, Scott Marlowe wrote:
>
>> It's a reasonable start.  However, if you consistently using less than
>> that in aggregate then lowering it is fine.
>
> Is there a way to tell if I consistently use less than that in aggregate?

Keep an eye on shr for postgres processes in top. It should
eventually reach about the same size as your shared_buffers if you're
using it. If it stays at 500M or something then you don't need as
much shared_buffers.

>> What's your work_mem and max_connections set to?
>
> I have the default settings, e.g. work_mem = 1MB and max_connections = 100.
>
> I'm looking to process 400 requests per second, though. What should I use for the above?

Those settings are fine to start. Look at connection pooling, as
having too many backends can cause the db to run slower. Generally 2x
or so as many cores as you have is a good place to start with how many
connections to keep alive by the pooler.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Diogo Melo 2011-04-26 15:43:04 Recover database from binary files
Previous Message Willy-Bas Loos 2011-04-26 15:36:49 [GENERAL]auto vacuum during restore