Re: [GENERAL] PostgreSQL too heavy startup
От | Amos Hayes |
---|---|
Тема | Re: [GENERAL] PostgreSQL too heavy startup |
Дата | |
Msg-id | Pine.LNX.3.96.980608142811.10127I-100000@smurf.ingenia.com обсуждение исходный текст |
Ответ на | PostgreSQL too heavy startup ("Igor Sysoev" <igor@nitek.ru>) |
Список | 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@ingenia.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
В списке pgsql-general по дате отправления: