Ok, thank you for the detailed recommendation. I try to step the way you
wrote.
Vlad.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
> Sent: Friday, June 23, 2000 6:09 PM
> To: Vladislav Safronov
> Cc: [EMAIL PROTECTED]
> Subject: RE: Highly optimized mod_perl ?
>
>
> Well, with little knowledge I have about mod_perl
>
> if sys admin tells you that mod_perl slows down
> the system, before making changes to the program
> you should have at least the following:
>
> a) Memory utilization numbers (sorted by a process)
> b) CPU utilization numbers (sorted by a process)
> c) Whether there is any process locks any file for more then a second
> d) If you access the dabase you need statics for what
> the db engine is doing
> e) you also need to know whether the network requests that your
> program makes are being handled immediately by other servers
> f) you should profile your application and see if the numbers
> from the profile correlate to overall system utilization statistics
> that you obtained in steps above.
> g) you should also be able to determine things like:
> how often perl has to recompile a module. Are you regular
> expressions
> being evaluated every time when executed.
>
>
> Once you get all that information, this list may be able to help
> you in deciding what and how to optimize.
> Performance tuning is a science on its own (a little one :-) ) and
> there are a lot of details to be considered there.
>
> Regards,
> Vladislav
>
>
>
>
> On 23-Jun-2000 Vladislav Safronov wrote:
> > Hi, ( ili privet )
> >
> > I was looking any tips and tricks to optimize my perl script since,
> > our sysadm tells that it's mod_perl slow down the web server
> > response time and it should be rewritten in C. This script
> > does use any database connection, so I think threre is no
> real way to
> > speed it up. Posting message here was the last chance.
> >
> > Vlad.
> >
> > pishite po-russki.
> >
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
> >> Sent: Saturday, June 17, 2000 9:24 PM
> >> To: Vladislav Safronov
> >> Cc: [EMAIL PROTECTED]
> >> Subject: RE: Highly optimized mod_perl ?
> >>
> >>
> >> 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: [EMAIL PROTECTED]
> >>
>