Re: Perl/CGI performance issue

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Wed, 21 Jun 2000 17:38:36 +0530
 To:  <hwg-languages(at)hwg.org>
 References:  digitaldaze
  todo: View Thread, Original
Hi,

I'm just taking a wild guess here, but if you are sharing a system with lots
of users (that also means lots of scripts) each script is alloted a specific
time slot within which they have to finish the job, or else they have to
join the queue at the end to complete the remainder of their operations,
quite similar to the time-sharing systems of yesteryears.

So if a script is allowed say 1000 m/sec to execute, and it requires 2100
m/sec to execute, the script execution time will be 800500 m/sec approx on a
system of 500 concurrent scripts, assuming that on average most scripts
take800 m/sec. to execute.

Maybe I'm right?

-Srini



----- Original Message -----
From: Mailing List Account <ml(at)digitaldaze.com>
To: <hwg-languages(at)hwg.org>
Sent: Wednesday, June 21, 2000 1:01 AM
Subject: Re: Perl/CGI performance issue


|
| Try mod_perl
|
| On Tue, 20 Jun 2000, David Mintz wrote:
|
| > I'm starting to get disgusted with the slow response
| > of some of my Perl/CGI programs and I'm trying to
| > figure out where the bottleneck is and how to fix it.
| >
| > I rent space on a shared server. Scripts that are
| > short and simple, e.g., that send mail somewhere and
| > say have a nice day, perform quite acceptably. But
| > ones that, say, build complicated queries and submit
| > them to my host's mSQL server and return results to
| > the browser... 20 seconds is typical.(See for example
| >
http://najit.org/cgi-najit/msql/najit_search.cgi?SearchType=language&start=2
6&language_id=Spanish%2361)
| > And my scripts drag even when they don't connect to my
| > database -- for example when the form input doesn't
| > pass the sanity check so it just prints a message and
| > prints the form again and exits.
| >
| > Does an 800 line script have to take longer to do its
| > thing than a 40 line script by a factor of 20?  Note
| > that my longish programs don't actually execute every
| > line, far from it --- rather, different subs are
| > called depending on what the user is doing. But I
| > gather Perl has to parse the whole thing, regardless,
| > before execution. Is that what's killing me?
| >
| > As for my code itself, I know I'm no Randall Schwartz
| > but I don't think it's all that inefficiently written
| > -- certainly not in proportion to the penalty I seem
| > to be getting hit with.
| >
| > Or is this slowness more likely due to the load on the
| > server and the fact that my app is at the mercy of
| > everyone else's?  If that's so, how come a quickie
| > 'hello world' script doesn't seem to suffer from the
| > same problem?
| >
| > David Mintz
| > Web Design & Hosting http://www.dmintzweb.com
| > Personal http://www.panix.com/~dmintz
| >
| > __________________________________________________
| > Do You Yahoo!?
| > Send instant messages with Yahoo! Messenger.
| > http://im.yahoo.com/
| >
|
|

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA