Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2001 13:09:59 -0700
From:      Sean Chittenden <sean@chittenden.org>
To:        Marcel Prisi <marcel-lists@virtua.ch>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: PostgreSQL & shared memory
Message-ID:  <20011012130959.C97952@rand.tgd.net>
In-Reply-To: <006001c1516b$db2637b0$8d01a8c0@gastroleader.com>; from "marcel-lists@virtua.ch" on Wed, Oct 10, 2001 at = 11:13:41AM
References:  <006001c1516b$db2637b0$8d01a8c0@gastroleader.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.

Whew, I was going to bing you with a clue bat if you didn't suggest
getting more RAM: 380MB of RAM isn't much.  All this aside, what you
want to do is setup a reverse proxy server.  You have these HUGE Apache
and postgresql processes sitting around in RAM spending most of their
time doing what?  Writing their data out over the wire.  The best thing
you can do to speed up your webapp is to increase your kernel output
buffers and/or use a reverse proxy (mod_backhand, mod_proxy, or even
squid).  Would you like to have a large 12-20MB process sending data out
over the wire, or a small 400KB process that's mostly shared memory? -sc

-- 
Sean Chittenden

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?20011012130959.C97952>