From owner-freebsd-isp Wed Oct 10 2:14:25 2001 Delivered-To: freebsd-isp@freebsd.org Received: from xor.aubonne.virtua.ch (virtua.sefanet.ch [195.202.225.253]) by hub.freebsd.org (Postfix) with ESMTP id E42DB37B408; Wed, 10 Oct 2001 02:14:14 -0700 (PDT) Received: from RATAMIAOU ([192.168.1.141]) by xor.aubonne.virtua.ch (8.9.3/8.8.7) with SMTP id LAA01304; Wed, 10 Oct 2001 11:14:17 +0200 Message-ID: <006001c1516b$db2637b0$8d01a8c0@gastroleader.com> From: "Marcel Prisi" To: Cc: Subject: PostgreSQL & shared memory Date: Wed, 10 Oct 2001 11:13:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi all ! We just published a new website running on FreeBSD 4.4 prerelease 10 august / apache 1.3.20 / php 4.0.6 / PostgreSQL 7.1.2 . In fact we moved the site from a Win2k/iis/sqlserver to BSD, and we have a HUGE amount of hits, and the machine is already getting overloaded. PostgreSQL seems like a ressource hog. The machine is a bi-PIII 866Mhz, 380Mb RAM, Adaptec 2100s. I had to stop using both keepalive in apache and persistent connections in php in order to keep the machine from swapping and not responding anymore. The load is extremely high as some SQL queries are really hard ... The first thing we'll do is install some more memory, and then a separate machine for PostgreSQL. My question is : what are the settings I should add to be able to handle about 400-500 connections to PostgreSQL ? What about shared memory & FreeBSD kernel ? Thanks for your help. Here are some parts of the current kernel configuration file : machine i386 cpu I686_CPU ident FBSD1 maxusers 128 options NMBCLUSTERS=16384 # System V shared memory and tunable parameters options SYSVSHM # include support for shared memory options SHMMAXPGS=4096 # max amount of shared memory pages (4k on i386) options SHMSEG=256 # max shared memory segments per process # System V semaphores and tunable parameters options SYSVSEM # include support for semaphores options SEMMAP=256 # amount of entries in semaphore map options SEMMNI=256 # number of semaphore identifiers in the system options SEMMNS=512 # number of semaphores in the system options SEMMNU=256 # number of undo structures in the system # System V message queues and tunable parameters options SYSVMSG # include support for message queues # To make an SMP kernel, the next two are needed options SMP # Symmetric MultiProcessor Kernel options APIC_IO # Symmetric (APIC) I/O To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message