Re: FreeBSD kernel configuration

From: Vivek Khera <vivek(at)khera(dot)org>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: FreeBSD kernel configuration
Date: 2007-03-06 15:59:09
Message-ID: 9658D735-82BA-4131-ADE0-26E9C9476783@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 6, 2007, at 3:42 AM, veejar wrote:

> Hi!
>
> I have server such configuration:
> 2 x Xeon LV DualCore 1.66GHz
> MEM 4Gb DDR2-400
> 2 x 250Gb SATA HDD
>

how are you using the drives? software mirror?

> I have 20 databases on PostgreSQL 8.
> 2 of them are more than 1GB.
> I have ~50 requests per second.

Nice small DB's... :-)

> What kernel setting can you recommend me?
>

in sysctl.conf:

# Following for Postgres to use more memory and semaphores
# see also kern.ipcs.sem* in /boot/loader.conf
kern.ipc.shm_use_phys=1
kern.ipc.shmmax=1073741824
kern.ipc.shmall=262144
kern.ipc.semmsl=512
kern.ipc.semmap=256

in loader.conf:
# IPC settings for big postgres
# see also /etc/sysctl.conf for other kern.ipc settings
kern.ipc.semmni=32
kern.ipc.semmns=512

But your most bang for the buck will be optimizing your
postgresql.conf file. This is a black art :-( and takes much
experimentation.

I'm considering increasing SHMMAX and SHMALL given recent postgres
developments, and having more than 4Gb of RAM on some of my
servers... But it suits me so far.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message MargaretGillon 2007-03-06 16:14:43 Re: M:M table conditional delete for parents
Previous Message Korin Richmond 2007-03-06 15:51:57 Re: plpythonu and PYTHONPATH/sys.path