Gossamer Forum
Home : Products : DBMan : Customization :

excessive CPU usage (active site)

Quote Reply
excessive CPU usage (active site)
i got this message today. what can be wrong with db.cgi that it uses so much resources? it serves about 30k pages per day? is that too much? database sizes is about 600, 50 and 200 entries. what can i do to lower CPU usage. i have four separate db.cgi files running for each database. would it lower CPU usage if i use just one db.cgi for all databases?


Dear Webmaster ;

Your CGI access has been turned off due to excessive CPU utilization of your
CGI scripts. db.cgi was responsible for 75% of the CPU loading on the
server. Your CGI access will be restored once you email back to us that you
have address this problem with the CGI.

Thank you

Les Eyestone


Quote Reply
Re: excessive CPU usage (active site) In reply to
You should consider DBMan SQL, or a dedicated server.

Quote Reply
Re: excessive CPU usage (active site) In reply to
A question.
Why do you have four separate db.cgi files running for each database?

Bob
http://totallyfreeads.com


Quote Reply
Re: excessive CPU usage (active site) In reply to
Could someone point out some overall strategies of minimizing CPU consumption by dbman?

Thanks

Long

Quote Reply
Re: excessive CPU usage (active site) In reply to
Well, splitting up html.pl and db.pl into smaller files would almost definitely reduce the time the script takes to run, and that would consequently reduce CPU usage. You would need to add the necessary "require thisnewfile.pl" to your files though, but that shouldn't be too difficult to figure out.

Also, you could try as much as possible to keep your file sizes down (ie. default.db, default.log & default.pass) as the (open, read from/write to ,close) file operations take longer when the files are bigger, and this makes the script run longer.

Of course, if you are running multiple db's, you should try and run one db.pl as far as is possible.

Then there are tools/programs for Apache (mod_perl, I think), and for MS IIS (PerlIIS.dll, I think) which will improve Perl script performance. These will have to be implemented by your web host, of course.