On Wed, Jun 25, 2008 at 4:24 PM, tyju tiui <[EMAIL PROTECTED]> wrote: > hmmm, I read the performance chapters from http://www.modperlbook.org/ but > there really isn't much in the way of mod_perl-specific tweaks. > It's mostly about hardware tips, benchmarking tips, and apache server tweaks > (and of course perl language tweaks).
Well, that's really all there is to tune with mod_perl itself. The rest is Perl. > The book recommended preloading perl modules which was helpful, but it is > still way behind the C module (4 - 5 times fewer requests per second). > Is mod_perl just that much slower than a pure C module? Is C 5 times faster than Perl? Yes, it often is for CPU intensive number-crunching applications. Is that what you're doing? > What I'm saying is I don't think it's the code which is making such a huge > difference ... I think mod_perl itself is the bottleneck. Since mod_perl is just the glue code between Apache and Perl, that doesn't really make sense. The overhead of mod_perl compared to running a C module is negligible. What's taking all the time is your Perl code. There are lots of tricks for improving the speed of Perl, but unless you can show us some code, there's no way for us to help you. I still suggest running your code through a profiler and then getting help with the slowest parts, either here or on a general Perl discussion. - Perrin