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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.