Re: Upgrade to dual processor machine?
От | Josh Berkus |
---|---|
Тема | Re: Upgrade to dual processor machine? |
Дата | |
Msg-id | 200211121205.44452.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Upgrade to dual processor machine? ("Henrik Steffen" <steffen@city-map.de>) |
Ответы |
Re: Upgrade to dual processor machine?
|
Список | pgsql-general |
Heinrik, "So, where do i find and change shmmax shmall settings ?? What should I put there? What is a recommended value for shared buffers in postgresql.conf ?" There is no "recommended value." You have to calculate this relatively: 1) Figure out how much RAM your server has available for PostgreSQL. For example, I have one server on which I allocate 256 mb for Apache, 128 mb for linux, and thus have 512mb available for Postgres. 2) Calculate out the memory settings to use 70% of that amount of Ram in regular usage. Please beware that sort_mem is *not* shared, meaning that it will be multiplied by the number of concurrent requests requiring sorting. Thus, your calculation (in K) should be: 250K + 8.2K * shared_buffers + 14.2K * max_connections + sort_mem * average number of requests per minute ===================================== memory available to postgresql in K * 0.7 You will also have to set SHMMAX and SHMMALL to accept this memory allocation. Since shmmax is set in bytes, then I generally feel safe making it: 1024 * 0.5 * memory available to postgresql in K Setting them is done simply: $ echo 134217728 >/proc/sys/kernel/shmall $ echo 134217728 >/proc/sys/kernel/shmmax This is all taken from the postgresql documentation, with some experience: http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/runtime.html -- -Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-general по дате отправления: