From owner-freebsd-isp Thu Oct 11 1: 6:28 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 E45C437B405 for ; Thu, 11 Oct 2001 01:06:21 -0700 (PDT) Received: from RATAMIAOU ([192.168.1.141]) by xor.aubonne.virtua.ch (8.9.3/8.8.7) with SMTP id KAA09173; Thu, 11 Oct 2001 10:06:00 +0200 Message-ID: <006b01c1522b$7f9ad750$8d01a8c0@gastroleader.com> From: "Marcel Prisi" To: "Wojciech Sobczuk" Cc: "J. Goodleaf" , "BSD-ISP" References: <006001c1516b$db2637b0$8d01a8c0@gastroleader.com> <20011010144555.B28041@freebsd.hbz.pl> Subject: Re: PostgreSQL & shared memory Date: Thu, 11 Oct 2001 10:05:26 +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 ! Daniel's hint did not help at all as I already had tweaked those values (thanks for his help anyway). The most important ones seem to be in the kernel config, both SEMMNI and SEMMNS. With SEMMNI=256 and SEMMNS=512 (have a look in my previous email for the other values) I could get about 400 connections, which is enough. On the other hand, I have been impressed by FreeBSD as even when the load was incredibly high (I saw up to 35.4 load average !!), I could always have an ssh console and the machine stood up. This is the first FreeBSD machine we have in such a load (we were linux-oriented up to now) and I must say that I doubt linux would have handled such a load that way). What seems interested is the kind of "deadlock" in which the machine seem to have been : we had so many requests that the machine started swapping (it has 1Gb swap) and more and more zombie processes arrived. I had to restart both apache & postgresql as the machine was unable to answer any http request. It started again everytime the machine started swapping again. In order to keep the machine in the ~2.0 - 3.0 load average, I had to stop apache from using keepalive and stop php from using persistent postgresql connections. We now added 512Mb of RAM, giving a total of 896Mb, anf I could allow keepalive & pesistent connections again, the machine does not swap anymore, and it works much better, so yes, adding RAM is one of the best solutions ! We'll set-up a second machine in the next days, so we'll separate db from http server, we'll see if it helps (I am sure it will help a bit, but not that much). I now have to see with our development department in order to optimize their code, as there are way too many sql requests, and I am sure this will be a much better solutions. Thanks to all who helped ! ----- Original Message ----- From: "Wojciech Sobczuk" To: "Marcel Prisi" Sent: Wednesday, October 10, 2001 2:45 PM Subject: Re: PostgreSQL & shared memory > On Wed, Oct 10, 2001 at 11:13:41AM +0200, Marcel Prisi wrote: > > 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 . > > > > hey, > > did Daniel Oconnor's hint help with anything? i'm going to setup such a > computer any day now and i'd like to know if tuning the kernel will make it > work. > > last time i setup postgresql with a heavy load (it was a 6.x on RedHat) - i > pulled it down because it clogged the box.. > > thanks, > Wojtek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message