понедельник, 28 июля 2008 г.

kernel.shmall & kernel.shmmax

kernel.shmall is a total amount of shared memory pages (not bytes) available for allocation systemwide.
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 =)

суббота, 26 июля 2008 г.

2nd try

just abother test entry.

my first blog entry here

just trying to move from LJ

PS added another tag, 'test'