From: | Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: The right SHMMAX and FILE_MAX |
Date: | 2011-05-02 09:06:28 |
Message-ID: | 4DBE7414.2010902@catalyst.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 01/05/11 18:48, Phoenix Kiula wrote:
> Now, according to my reading in the PG manual and this list, a good
> recommended value for SHMMAX is
>
> (shared_buffers * 8192)
>
> My postgresql.conf settings at the moment are:
>
> max_connections = 300
> shared_buffers = 300MB
> effective_cache_size = 2000MB
>
> By this calculation, shared_b * 8192 will be:
>
> 2,457,600,000,000
>
> That's a humongous number. So either the principle for SHMMAX is
> amiss, or I am reading this wrongly?
You are confusing shared_buffers expressed as "number of pages" with
shared_buffers expressed as "MB". The docs are assuming you are working
with the former (and would appear to be assuming your pagesize is 8K -
which is teh default but not required to be the case). If you are
showing shared_buffers as "MB" then obviously you cane set SHMMAX using
the value multiplied by (1024*1024), so in your case:
300 * (1024*1024) = 314572800
However note that there are things other than shared_buffers require
shared memory, so you'll need more than this. Use Greg's script.
Cheers
Mark
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2011-05-02 10:50:19 | Re: The right SHMMAX and FILE_MAX |
Previous Message | Claudio Freire | 2011-05-02 07:58:40 | Re: Query improvement |