Size of the page is determined by `getconf PAGE_SIZE`.
kernel.shmmax is the maximum size of shared memory chunk in bytes (not pages) available for one application.
What does it mean in real wildlife? Well, let's suppose we have here a server with 2 Gb of physical memory and trying to run postgresql server on it. We decide to give a half of whole system memory to PG. So, we type in our command prompt with bash/zsh something like
sysctl kernel.shmall=$((1024*1024*1024/`getconf PAGE_SIZE`))
sysctl kernel.shmmax=$((1024*1024*1024))
...and voila! we just did the dummiest thing ever, cause postgresql will have to manage all this gigabyte at it own. We just need to inform him about our intention:
vim postgresql.conf
/shared_buffers
& change shared_buffers to 1 gigbyte =)
Комментариев нет:
Отправить комментарий