Date: Thu, 11 Oct 2001 10:05:26 +0200 From: "Marcel Prisi" <marcel-lists@virtua.ch> To: "Wojciech Sobczuk" <sopel@freebsd.hbz.pl> Cc: "J. Goodleaf" <john@goodleaf.net>, "BSD-ISP" <freebsd-isp@FreeBSD.ORG> Subject: Re: PostgreSQL & shared memory Message-ID: <006b01c1522b$7f9ad750$8d01a8c0@gastroleader.com> References: <006001c1516b$db2637b0$8d01a8c0@gastroleader.com> <20011010144555.B28041@freebsd.hbz.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
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" <sopel@freebsd.hbz.pl> To: "Marcel Prisi" <marcel-lists@virtua.ch> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006b01c1522b$7f9ad750$8d01a8c0>