Re: The right SHMMAX and FILE_MAX

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: The right SHMMAX and FILE_MAX
Дата
Msg-id 4DBECB5C.20104@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: The right SHMMAX and FILE_MAX  (Adarsh Sharma <adarsh.sharma@orkash.com>)
Список pgsql-performance
On 05/02/2011 12:53 AM, Adarsh Sharma wrote:
> I am also in need of a proper documentation that explains how to set
> SHMAX and SHMALL variables in Postgres.
>
> What things need to be taken in consideration before doing that ?
> What is the value of SHMAX & SHMALL if u have 16 GB RAM for Postgres
> Server ?

Running the script I provided on a Linux server with 16GB of RAM:

$ cat /proc/meminfo | grep MemTotal
MemTotal:       16467464 kB

$ getconf PAGE_SIZE
4096

$ ./shmsetup
# Maximum shared segment size in bytes
kernel.shmmax = 8431341568
# Maximum number of shared memory segments in pages
kernel.shmall = 2058433

That sets SHMMAX to 50% of total RAM, which should be sufficient for any
reasonable installation of PostgreSQL.  shmmall is a similar limit
expressed in system pages instead, so as seen here you have to divide by
the system page size of 4096 to figure it out.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.4.7, incorrect estimate
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: 8.4.7, incorrect estimate