Re: tuning on ec2 - Mailing list pgsql-general

From Scott Marlowe
Subject Re: tuning on ec2
Date
Msg-id BANLkTimnWOcft2BWB_sDEnWS0HhvjEaKEw@mail.gmail.com
Whole thread Raw
In response to Re: tuning on ec2  (Joel Reymont <joelr1@gmail.com>)
List pgsql-general
On Tue, Apr 26, 2011 at 9:34 AM, Joel Reymont <joelr1@gmail.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.

pgsql-general by date:

Previous
From: Willy-Bas Loos
Date:
Subject: auto vacuum during restore
Next
From: Diogo Melo
Date:
Subject: Recover database from binary files