Re: Setting kernel.shmmax

Поиск
Список
Период
Сортировка
От Mike Ivanov
Тема Re: Setting kernel.shmmax
Дата
Msg-id 4A57B302.9050600@activestate.com
обсуждение исходный текст
Ответ на Re: Setting kernel.shmmax  (fatih ozturk <ozturkfa@yahoo.com>)
Список pgsql-admin
fatih ozturk wrote:

 > In most of tuning guides setting shmmax
 > parameter to %90 of total memory is advised.

Does not seem a good idea to me.

 > is kernel.shmmax is about max connection to a database.
 > So shmmax does not effects memory usage of querys directly.

No.

OK, there are two parameters. One is called shared_buffers in
posrgesql.conf. This parameter defines the size of a memory block used
by Postgres for buffers, cache and such. This memory region is called
Shared Memory (well, because it is shared between Postgres processes).

The operating system puts certain limits on how big those shared memory
regions could be. The maximum size is defined by kernel.shmmax parameter.

First you decide on how much memory Postgres should use. How much
exactly--it depends. In most cases it is safe to give 1/4 to 1/2 of all
the memory to Postgres, provided there are no other services (like
Apache) running on that machine. In your particular case I'd stick
closer to 1/4 side. Put that value in postgresql.conf.

Now, make kernel.shmmax slightly bigger than shared_buffers to
accommodate that value.

Cheers,
Mike



В списке pgsql-admin по дате отправления:

Предыдущее
От: Anj Adu
Дата:
Сообщение: Re: Setting Shared-Buffers
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Setting Shared-Buffers