Confused about SHMMAX

Started by Sanjay Bhatiaalmost 25 years ago4 messagesgeneral
Jump to latest
#1Sanjay Bhatia
sanjay@reactivity.com

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

#2Thalis A. Kalfigopoulos
thalis@cs.pitt.edu
In reply to: Sanjay Bhatia (#1)
Re: Confused about SHMMAX

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 Pg so increasing it could benefit you. The rule of thumb (last week's list archives) is to tell postgres on startup to use shmem 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:

Show quoted text

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

#3Ian Harding
ianh@tpchd.org
In reply to: Thalis A. Kalfigopoulos (#2)
Re: Confused about SHMMAX

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 machine with 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 Pg so increasing it could benefit you. The rule of thumb (last week's list archives) is to tell postgres on startup to use shmem 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

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Sanjay Bhatia (#1)
Re: Confused about SHMMAX

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