Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
By 'fairly busy', I'm thinking about something in the region 30000-50000 hits a day.
Depends on what you're doing in your scripts. If you're carful about how much code you load per request and use some clever caching (and don't forget to set caching http headers!), you can probably get that many hits on a CGI. I've built a couple of CGI-based sites that could handle more than that - depending on the hard-ware ofcourse - but they tend to be awfully slow at the peak hours.

Anyway - and I'm guessing from experience, I don't have any kind of figures to back this up - the biggest problem with perl CGI's under this kind of load is probably not loading the perl interpreter itself (though on heavier loads that will also become a problem), but loading all the code that you have in your scripts. One thing you can do to reduce this, is to require modules just before you actually use them, instead if useing everything at compile time (assuming you have your code in seperate modules that you don't need for every request). Another thing that might slow you down is creating database handles (though MySQL is pretty fast, some other databases make it nearly impossible to run from CGI at all).

Ofcourse, mod_perl will do away with this problem for you, and then it will be more efficient to use as much as you can in the startup.pl script.


In reply to Re: Perl cgi without mod_perl, your experience by Joost
in thread Perl cgi without mod_perl, your experience by kiat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-01-19 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?