Re: The right SHMMAX and FILE_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux