Here's an update on my experience with moving some web apps into mod_perl:

stricting everything pretty much worked for me. I don't seem to have any strange variable problems. Oh, and I saw an eight-fold (798%) increase in performance. Oof!

They requests I tested do a couple of select queries and one update to a "pageaccess" table, and output a page and graphic of about 5k. Admittedly small, but that's how I keep pages anyway.

I did these tests loopback, so no bandwidth restrictions apply here. Look at the "Requests per second" value. Here's the skinny, from ApacheBench:

Not using mod_perl


Concurrency Level: 50 Time taken for tests: 87.313 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 5232000 bytes HTML transferred: 5085000 bytes Requests per second: 11.45 Transfer rate: 59.92 kb/s received


Same test, using mod_perl


Concurrency Level: 50 Time taken for tests: 10.943 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 5232000 bytes HTML transferred: 5085000 bytes Requests per second: 91.38 Transfer rate: 478.11 kb/s received


Same box, static page


Concurrency Level: 50 Time taken for tests: 0.754 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 4510800 bytes HTML transferred: 4243680 bytes Requests per second: 1326.26 Transfer rate: 5982.49 kb/s received

As expected, dynamic pages are far slower than static. But the acceleration afforded by mod_perl has brought the per-second page value for dynamic pages above the limit imposed by my bandwidth (1.5 megabit T1, which works out to around 55 pages a second in my testing.) That means it'll be hard to choke my server with mod_perl accelerated dynamic pages. My bandwidth will be used up long before I overtax my disk and processor speed.

Server stats, for those interested:

My next project is setting up persistent mySQL connections to squeeze even more speed out of this puppy


In reply to Re: mod_perl- am I safe? UPDATE!! COOL GEEK BENCHMARKING STUFF HERE!! by Hero Zzyzzx
in thread mod_perl- am I safe? by Hero Zzyzzx

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.