in reply to Re: Timing concerns on PerlEX/Mod_Perl
in thread Timing concerns on PerlEX/Mod_Perl

Okay here is detailed results:



Code Time=0.0715248584747314 seconds

Start Code Execution=1217024869.1958

End Code Execution=1217024869.2

LWP Start Time=1217024848.42043

LWP End Time=1217024871.99951

LWP Total Time=23.5790810585022

LWP Start->Code Start=20.77537 seconds

Code End->LWP End=2.79951 seconds

Head Time=20.0828440189362 seconds

Total LWP Time For Google: 1.80555105209351 seconds

Margin Of Error For LWP<->Code results: around 2 seconds

so by the look of this...it took 20 seconds just to start up the code...since the code though is in PerlEX/Mod_Perl it shouldn't take this long..so either server is taking logn time to start up...or ModPerl and PerlEX are loosing their cache/taking long time to access the cache?
Anyone have any ideas on what to do now?
  • Comment on Re^2: Timing concerns on PerlEX/Mod_Perl

Replies are listed 'Best First'.
Re^3: Timing concerns on PerlEX/Mod_Perl
by BrowserUk (Patriarch) on Jul 25, 2008 at 23:10 UTC
    Anyone have any ideas on what to do now?

    I know naff all about PerlEz or Mod_perl, but I would think the next thing to do is determine if it is all scripts on that server, or just this particular script.

    Ie. Write a simple script that does nothing except produce the timing information as above.

    • If that also displays the same effects, it is a 'server problem'.

      Contact the hoster and ask for a different setup?

    • If not, then you're down to trying to isolate what it is in that script that causes it.

      The usual process of commenting everything but the timing code out and then putting it back a bit at a time until the problem manifects itself again seems appropriate.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I isolating is kind of hard since I use one central code that loads functions. So it would pretty much means rewriting the entire code.

      What PerlEX and Mod_Perl do is they pre-load a lot of the variables and start up into memory and then execute threads that access the persistent data.

      personally I do not think im storing that much data into ram that would give it issues in spawning threads but it could be my use of namespaces :/..if there was only a way..maybe ISAPI component to monitor script start up or etc :/...or maybe some apache functions?

        You don't have rewrite or even change the script.

        Make a copy of it, with the timing code, under a different url.

        Comment out everything except the timing code and run it.

        Still the same effect?

        1. Yes: Your server set-up isn't what you think it is or it is screwed.
        2. No.
          1. Uncomment half the script.
          2. Run it again. Still okay?
            1. Yes: Uncomment half of the remaining code. Goto 2b
            2. No: Re-comment half the code you just uncommented. Goto 2b

        You'll rapidly find the line of the code that screwing you.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: Timing concerns on PerlEX/Mod_Perl
by Anonymous Monk on Jul 26, 2008 at 03:36 UTC
    or ModPerl and PerlEX are loosing their cache/taking long time to access the cache?

    Or you're not using ModPerl/PerlEX at all, and its just plain CGI (or the really really slow one is running as CGI)

      I assure you that isn't the case..I wanted to see what would happen if I ran it as regular CGI...it completely froze my server and had to restart. Regular CGI would never be able to achieve 0.07 loading speeds..well maybe a "Hello World"? (not to mention the start up time would not be the issue but execution time would be..as regular perl it took 8 seconds to load..4 seconds for begin block and 4 seconds for regular code execution)

      Anyways point being is I'm 100% sure it is all PerlEX/Mod_Perl.