in reply to mod_perl- am I safe?

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

Replies are listed 'Best First'.
Re: Re: mod_perl- am I safe? UPDATE!! COOL GEEK BENCHMARKING STUFF HERE!!
by Hero Zzyzzx (Curate) on Jun 05, 2001 at 00:16 UTC

    One more update:
    Upgrading the same box with the same hardware to Redhat 7.1 with the 2.4 kernel saw a significant speed boost again, partly due to 2.4s better SMP support, methinks.

    Dinging the same dynamic page of the same site saw page generation rise to 140 pages/second. Damn!!

    This may all not be attributable to the kernel upgrade, of course. Apache and mod_perl were upgraded too during the OS upgrade. This boost could be attributed to the persistent DB connections afforded by Apache::DBI, which I've finally puzzled out.

    Thought some of you might be interested.