From: | Amos Hayes <ahayes(at)ingenia(dot)com> |
---|---|
To: | Igor Sysoev <igor(at)nitek(dot)ru> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] PostgreSQL too heavy startup |
Date: | 1998-06-08 18:51:58 |
Message-ID: | Pine.LNX.3.96.980608142811.10127I-100000@smurf.ingenia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 5 Jun 1998, Igor Sysoev wrote:
> I'm using P-100, 32M, 128M swap, FreeBSD 2.2.5-STABLE, Apache-1.2.6,
> perl 5.004_4, PostgreSQL-v6.3.2.
> One of CGI scripts makes select from database. When I try to quickly
> reload this script about 20 times in browser the FreeBSD starts to heavy
> swapping. I'd appled patch to remove exec() from startup code. It seems
> that nothing changed.
> Is there way to make more lighter startup ?
I have used a combination of the following to achieve quick CGI response
from the DB with little modification to existing CGI code:
FastCGI (http://www.fastcgi.com/) and mod_fcgi for Apache
(http://www.apache.org/)
Perl (http://www.perl.com) compiled with the sfio extensions
(http://www.perl.com/CPAN-local//src/misc/sfio97.src.unix.tar.gz)
DBI (http://www.perl.com/CPAN-local//modules/by-module/DBI/) and
appropriate DBD (http://www.perl.com/CPAN-local//modules/by-module/DBD/)
CGI.pm
(http://www.perl.com/CPAN-local//modules/by-module/CGI/)
The only drawback that I've noticed is that each script you run consumes a
fair bit of memory. Assuming you've got lots of RAM, it's *much* faster
than trying to fire up databased scripts on a per request basis. There are
other ways of doing things which may make better use of resources (like
mod_perl & DBI) but the FastCGI method can help you get around some sticky
issues when you have a bunch of existing scripts.
--
Amos Hayes Systems Architect
ahayes(at)ingenia(dot)com Ingenia Group - Software Kinetics Ltd.
http://smurf.ingenia.com/~ahayes http://www.ingenia.com
"Remember: No one can make you feel inferior without your consent."
- ELEANOR ROOSEVELT
From | Date | Subject | |
---|---|---|---|
Next Message | Amos Hayes | 1998-06-08 19:06:50 | Re: [GENERAL] Not about LOGOs this time... |
Previous Message | ENTER YOU NAME HERE | 1998-06-08 18:41:42 | Foreign Keys |