Re: The right SHMMAX and FILE_MAX
От | Mark Kirkwood |
---|---|
Тема | Re: The right SHMMAX and FILE_MAX |
Дата | |
Msg-id | 4DBE7414.2010902@catalyst.net.nz обсуждение исходный текст |
Ответ на | The right SHMMAX and FILE_MAX (Phoenix Kiula <phoenix.kiula@gmail.com>) |
Список | 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
В списке pgsql-performance по дате отправления: