Changing SHMMAX

Started by Adarsh Sharmaabout 15 years ago4 messagesgeneral
Jump to latest
#1Adarsh Sharma
adarsh.sharma@orkash.com

Dear all,

Today i try to perform some performance tuning for Postgresql database.

I want to change my shared memory permanently.
I have 16 GB RAM.

Please guide me how to change it permanently and what is the correct
value for it.
I am going for 8GB .

Thanks & Regards
Adarsh Sharma

#2Florian Weimer
fweimer@bfk.de
In reply to: Adarsh Sharma (#1)
Re: Changing SHMMAX

* Adarsh Sharma:

Please guide me how to change it permanently and what is the correct
value for it.
I am going for 8GB .

Usually, you can put these lines

kernel.shmall = 9000000000
kernel.shmmax = 9000000000

into /etc/sysctl.conf. Run "sysctl -p" to activate them. However,
this is a bit distribution-specific.

--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

#3Torsten Zühlsdorff
foo@meisterderspiele.de
In reply to: Florian Weimer (#2)
Re: Changing SHMMAX

Florian Weimer schrieb:

Please guide me how to change it permanently and what is the correct
value for it.
I am going for 8GB .

Usually, you can put these lines

kernel.shmall = 9000000000
kernel.shmmax = 9000000000

into /etc/sysctl.conf. Run "sysctl -p" to activate them. However,
this is a bit distribution-specific.

If you're using FreeBSD you even have to restart the machine.

Greetings,
Torsten
--
http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8
verschiedenen Datenbanksystemen abstrahiert,
Queries von Applikationen trennt und automatisch die Query-Ergebnisse
auswerten kann.

#4Vick Khera
vivek@khera.org
In reply to: Torsten Zühlsdorff (#3)
Re: Changing SHMMAX

On Wed, Feb 2, 2011 at 10:31 AM, Torsten Zühlsdorff
<foo@meisterderspiele.de> wrote:

kernel.shmall = 9000000000
kernel.shmmax = 9000000000

into /etc/sysctl.conf.  Run "sysctl -p" to activate them.  However,
this is a bit distribution-specific.

If you're using FreeBSD you even have to restart the machine.

No, you do not. kern.ipc.shmall and shmmax are run-time tunables in FreeBSD.

The only postgres related settings you need a reboot to adjust are
kern.ipc.semmni and semmns.