On 6/1/05, Mark Kirkwood <[EMAIL PROTECTED]> wrote:
> Cosimo Streppone wrote:
> > ######### Config ############
> >> /etc/sysctl.conf:
> >> kernel.shmall = 786432000
> >> kernel.shmmax = 786432000
> >
> > I think you have a problem here.
> > kernel.shmmax should *not* be set to an amount of RAM, but
> > to maximum number of shared memory pages, which on a typical linux system
> > is 4kb. Google around:
> >
> This is somewhat confusing :
> 
> kernel.shmmax is in bytes (max single segment size)
> kernel.shmall is in (4k) pages (max system wide allocated segment pages)

Can someone resummarize the situation with these linux parameters for
the dummies? I thought I had my calculations all sorted out but now
I've confused myself again.

The documentation at
http://www.postgresql.org/docs/8.0/interactive/kernel-resources.html
puts the same figure into both values but the posts here seem to
suggest that is wrong?
Or is it different on a 2.4 kernel and the documentation needs updating?

In my specific case I have about 800meg of memory on a linux 2.4 kernel box.

Based on the powerpostgresql.com Performance Checklist [1]  and
Annotated Postgresql.conf [2] I understand that:
-I should have less than 1/3 of my total memory as shared_buffers
-For my server 15000 is a fairly reasonable starting point for
shared_buffers which is ~120MB
-I have 100 max_connections.

So I was going to set SHMMAX to 134217728 (ie 128 Meg)

What should SHMALL be?

The current system values are
[EMAIL PROTECTED]:~/data$ cat /proc/sys/kernel/shmmax
33554432
[EMAIL PROTECTED]:~/data$ cat /proc/sys/kernel/shmall
2097152

ie SHMALL seems to be 1/16 of SHMMAX


Paul

[1] http://www.powerpostgresql.com/PerfList/
[2] http://www.powerpostgresql.com/Downloads/annotated_conf_80.html

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to