Thread: Confused about SHMMAX
Hi, Can someone please tell me how to figure the optimal value of SHMMAX? I have not been able to find this information in the docs. Thanks, sb
It's not in the docs because it has to do with the use you make of your OS. The docs only mention that shmem is used by Pgso increasing it could benefit you. The rule of thumb (last week's list archives) is to tell postgres on startup to useshmem equivalent to approximately 1/4 of you total memory. This is done either through the -B <value> startup parameter,or by editing the shared_buffers entry in the $PGDATA/postgres.conf Keep in mind that each segment is 8192 bytes, so do the math accordingly. cheers, thalis On Mon, 25 Jun 2001, Sanjay Bhatia wrote: > Hi, > > Can someone please tell me how to figure the optimal value of SHMMAX? I > have not been able to find this information in the docs. > > Thanks, > sb > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
NetBSD seems to have a relatively low SHMMAX. I have a dedicated PostgreSQL server that is going to get quite a bit of traffic. Do I need to roll my own kernel with a higher SHMMAX to get good performance? What number should I use on a machinewith 256 MB RAM? There is a recent bug report suggesting an increase of the SHMMAX parameter as follows... -#options SHMMAXPGS=1024 # 1024 pages is the default +#options SHMMAXPGS=2048 # 2048 pages is the default Thanks! Ian A. Harding Programmer/Analyst II Tacoma-Pierce County Health Department (253) 798-3549 mailto: ianh@tpchd.org >>> "Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu> 06/25/01 05:01PM >>> It's not in the docs because it has to do with the use you make of your OS. The docs only mention that shmem is used by Pgso increasing it could benefit you. The rule of thumb (last week's list archives) is to tell postgres on startup to useshmem equivalent to approximately 1/4 of you total memory. This is done either through the -B <value> startup parameter,or by editing the shared_buffers entry in the $PGDATA/postgres.conf Keep in mind that each segment is 8192 bytes, so do the math accordingly. cheers, thalis On Mon, 25 Jun 2001, Sanjay Bhatia wrote: > Hi, > > Can someone please tell me how to figure the optimal value of SHMMAX? I > have not been able to find this information in the docs. > > Thanks, > sb > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Sanjay Bhatia writes: > Can someone please tell me how to figure the optimal value of SHMMAX? I > have not been able to find this information in the docs. http://www.de.postgresql.org/users-lounge/docs/7.1/postgres/kernel-resources.html#SYSVIPC -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter