Thread: Changing SHMMAX

Changing SHMMAX

From
Adarsh Sharma
Date:
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



Re: Changing SHMMAX

From
Florian Weimer
Date:
* 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

Re: Changing SHMMAX

From
Torsten Zühlsdorff
Date:
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.

Re: Changing SHMMAX

From
Vick Khera
Date:
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.