You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Vladislav Safronov <vl...@comptek.ru> on 2000/06/17 17:33:12 UTC

Highly optimized mod_perl ?

Hi!

Does anyone know the way to highly optimize mod_perl for speed?
Any hacks, advices? All standard advices read from help are done...

Best regards,

Vlad Safronov,                    
mailto: vlads@comptek.ru         

Re: Highly optimized mod_perl ?

Posted by Perrin Harkins <pe...@primenet.com>.
Vladislav Safronov wrote:
> Does anyone know the way to highly optimize mod_perl for speed?
> Any hacks, advices? All standard advices read from help are done...

The Guide (http://perl.apache.org/guide/) is very comprehensive.  If
you've followed the perfromance tuning tips there, the main thing left
is improving the speed of your database or other data access.  Use
Apache::DProf to find out where it hurts.
- Perrin

RE: Highly optimized mod_perl ?

Posted by pv...@bigfoot.com.
Yes, you are right.
I should have just said
'saves memory' -- most developers
realize the implications of improved
memory utilization.

Vladislav.

On 17-Jun-2000 G.W. Haywood wrote:
> Hi there,
> 
> On Sat, 17 Jun 2000 pvlad@bigfoot.com wrote:
> 
>> Saved memory means less swaping,
> 
> You don't want _any_ swapping on a mod_perl host.
> 
> 73,
> Ged.


RE: Highly optimized mod_perl ?

Posted by "G.W. Haywood" <ge...@www.jubileegroup.co.uk>.
Hi there,

On Sat, 17 Jun 2000 pvlad@bigfoot.com wrote:

> Saved memory means less swaping,

You don't want _any_ swapping on a mod_perl host.

73,
Ged.


RE: Highly optimized mod_perl ?

Posted by pv...@bigfoot.com.
Hi,

There was a discussion on this list about
1.5 weeks ago on how to optimize mod_perl
execution when using the database.  Stas
Bekman basically has done some tests to
show that the driver needs to be initialized
in startup.pl file.

There were also a discussion about the fact
that as far as using templates for HTML
generation the fastest approach is when
a template is compiled into perl code
before being executed.  I do not have
enough understanding of the internals to 
explain why though.

Another discussion suggested that it is
much better to precompile explicitly
the functions that you need to use
in modules like CGI.pm instead.  The
fact that you precompile specific functions
and not the whole module will save memory
space of apache processes that run mod_perl.
Saved memory means less swaping, and more
memory for cache -- that means speed.

There was also a post referring to a comparasing
between many scripting and compiled languages
that pointed out that by far the most
important factor when choosing a language
to implement a taks is what algorithm is
being used (ie. how smart and fast it is)
and that differences in programming languages
are not significant compared to that.

I also just recently read in "Advanced Perl Programming"
by Sriram Srinivasan that (on page 369)
there are Static Typing Hints:
        they give hints to the interepreter for better optimization
        and type checking.
        so 
        my Dog $spot = new Dog;
        should be faster
        then 
        my $spot= new Dog;

It actually should be faster for the consequent method calls
to $spot->xyz (because perl would not have to do type checking
and run-time)
(this me parapharsing the example from the book

Static hints will also allow for more aggressive compiler optimizations
(using perlcc) (but I do thing this mod_perl relevant).

This is my high level overview of what I have learned sofar
from the list (I am new to Perl so I am just trying to absorb
as much as possible).

Regards,
Vladislav P.






On 17-Jun-2000 Vladislav Safronov wrote:
> Hi!
> 
> Does anyone know the way to highly optimize mod_perl for speed?
> Any hacks, advices? All standard advices read from help are done...
> 
> Best regards,
> 
> Vlad Safronov,                    
> mailto: vlads@comptek.ru