App load times slow on first start up

Discussion in 'ASP .Net' started by SAL, Oct 29, 2007.

  1. SAL

    SAL Guest

    I have an ASP.NET 2.0 app that takes about 17 seconds to load on first
    startup but then is very fast after that. As I understand it from some posts
    in June, this is caused by the loading of the App Domain.
    We have both Cold Fusion and ASP.NET apps on this server and the Cold Fusion
    apps do not display such slowness on their first start up of the day. Is
    there a way to improve the load times of ASP.NET apps?
    I'm having to justify to my boss about why this is occuring.

    SAL
    SAL, Oct 29, 2007
    #1
    1. Advertising

  2. Have you given any thought to *pre-compiling* the app ?
    When you pre-compile, there's no first-load delay.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ======================================
    "SAL" <> wrote in message news:%...
    >I have an ASP.NET 2.0 app that takes about 17 seconds to load on first startup but then is very fast after that. As I
    >understand it from some posts in June, this is caused by the loading of the App Domain.
    > We have both Cold Fusion and ASP.NET apps on this server and the Cold Fusion apps do not display such slowness on
    > their first start up of the day. Is there a way to improve the load times of ASP.NET apps?
    > I'm having to justify to my boss about why this is occuring.
    >
    > SAL
    >
    Juan T. Llibre, Oct 29, 2007
    #2
    1. Advertising

  3. SAL

    Larry Bud Guest

    On Oct 29, 12:38 pm, "SAL" <> wrote:
    > I have an ASP.NET 2.0 app that takes about 17 seconds to load on first
    > startup but then is very fast after that. As I understand it from some posts
    > in June, this is caused by the loading of the App Domain.
    > We have both Cold Fusion and ASP.NET apps on this server and the Cold Fusion
    > apps do not display such slowness on their first start up of the day. Is
    > there a way to improve the load times of ASP.NET apps?
    > I'm having to justify to my boss about why this is occuring.


    The project is compiling the first time it's hit on your production
    server.

    Cold Fusion isn't compiled code.
    Larry Bud, Oct 29, 2007
    #3
  4. SAL

    SAL Guest

    Cold Fusion is, as I understand it, java byte code?

    I compiled the app on the server and it got a little faster but it's still
    pretty slow comparitively speaking. After the compile it went from 17
    seconds to 9 seconds to load.

    So, anytime the app site idle for a while, it's the slow startup times.
    Anybody else got any ideas?


    "Larry Bud" <> wrote in message
    news:...
    > On Oct 29, 12:38 pm, "SAL" <> wrote:
    >> I have an ASP.NET 2.0 app that takes about 17 seconds to load on first
    >> startup but then is very fast after that. As I understand it from some
    >> posts
    >> in June, this is caused by the loading of the App Domain.
    >> We have both Cold Fusion and ASP.NET apps on this server and the Cold
    >> Fusion
    >> apps do not display such slowness on their first start up of the day. Is
    >> there a way to improve the load times of ASP.NET apps?
    >> I'm having to justify to my boss about why this is occuring.

    >
    > The project is compiling the first time it's hit on your production
    > server.
    >
    > Cold Fusion isn't compiled code.
    >
    SAL, Oct 29, 2007
    #4
  5. Hi SAL,

    As other members mentioned, for ASP.NET 2.0 web application, you can
    perform precompilation on your web app so as to gain performance
    improvement as precompiled application do not need additional dynamic page
    code generation time. However, there are still startup time for
    JIT-compiling .NET code into native code. For your scenario, if there is
    no other particular long-run task at initialize time(such as the
    application_Start event...), the startup slow should be caused by JIT
    compile. How often will you notice this problem? I know that ASP.NET will
    shutdown worker process after it hasn't been visited for a while. And you
    can configure it to never shutdown through the following means:

    ** for IIS5 hosted scenario, you need to modify the <processModel> element
    in machine.config , see:

    #Keeping Your ASP.NET Worker Processes Alive
    http://weblogs.asp.net/dmarsh/archive/2003/02/21/2758.aspx

    ** for IIS6, since it use application pool for each application virutal
    dir, you need to turn off the shutdown setting in application pool setting.
    You can find it in the "performance" tab:

    "shutdown worker process after being idle for xxxxxx time"

    also see "Idle timeout" in below reference:

    #Configure Application Pool Performance (IIS 6.0)
    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6
    d3f37b8-c7ef-4a9c-9b78-eba9412181d8.mspx?mfr=true


    Here is also a good aritlce on IIS worker process recycle:

    http://blogs.msdn.com/david.wang/archive/2006/02/07/ASP-Startup-Shutdown-Ano
    malies-on-IIS6.aspx

    Hope it also helps some.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    --------------------
    >From: "SAL" <>
    >References: <#>

    <>
    >Subject: Re: App load times slow on first start up
    >Date: Mon, 29 Oct 2007 14:21:50 -0700
    >Cold Fusion is, as I understand it, java byte code?
    >
    >I compiled the app on the server and it got a little faster but it's still
    >pretty slow comparitively speaking. After the compile it went from 17
    >seconds to 9 seconds to load.
    >
    >So, anytime the app site idle for a while, it's the slow startup times.
    >Anybody else got any ideas?
    >
    >
    >"Larry Bud" <> wrote in message
    >news:...
    >> On Oct 29, 12:38 pm, "SAL" <> wrote:
    >>> I have an ASP.NET 2.0 app that takes about 17 seconds to load on first
    >>> startup but then is very fast after that. As I understand it from some
    >>> posts
    >>> in June, this is caused by the loading of the App Domain.
    >>> We have both Cold Fusion and ASP.NET apps on this server and the Cold
    >>> Fusion
    >>> apps do not display such slowness on their first start up of the day. Is
    >>> there a way to improve the load times of ASP.NET apps?
    >>> I'm having to justify to my boss about why this is occuring.

    >>
    >> The project is compiling the first time it's hit on your production
    >> server.
    >>
    >> Cold Fusion isn't compiled code.
    >>

    >
    >
    >
    Steven Cheng[MSFT], Oct 30, 2007
    #5
  6. SAL

    SAL Guest

    Thanks Steven. I found the articles on IIS6 helpful indeed.
    So, if I configure the app pool to only recycle around midnight, am I
    hurting the server's overall performance for other applications you think?

    SAL
    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi SAL,
    >
    > As other members mentioned, for ASP.NET 2.0 web application, you can
    > perform precompilation on your web app so as to gain performance
    > improvement as precompiled application do not need additional dynamic page
    > code generation time. However, there are still startup time for
    > JIT-compiling .NET code into native code. For your scenario, if there is
    > no other particular long-run task at initialize time(such as the
    > application_Start event...), the startup slow should be caused by JIT
    > compile. How often will you notice this problem? I know that ASP.NET will
    > shutdown worker process after it hasn't been visited for a while. And you
    > can configure it to never shutdown through the following means:
    >
    > ** for IIS5 hosted scenario, you need to modify the <processModel> element
    > in machine.config , see:
    >
    > #Keeping Your ASP.NET Worker Processes Alive
    > http://weblogs.asp.net/dmarsh/archive/2003/02/21/2758.aspx
    >
    > ** for IIS6, since it use application pool for each application virutal
    > dir, you need to turn off the shutdown setting in application pool
    > setting.
    > You can find it in the "performance" tab:
    >
    > "shutdown worker process after being idle for xxxxxx time"
    >
    > also see "Idle timeout" in below reference:
    >
    > #Configure Application Pool Performance (IIS 6.0)
    > http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6
    > d3f37b8-c7ef-4a9c-9b78-eba9412181d8.mspx?mfr=true
    >
    >
    > Here is also a good aritlce on IIS worker process recycle:
    >
    > http://blogs.msdn.com/david.wang/archive/2006/02/07/ASP-Startup-Shutdown-Ano
    > malies-on-IIS6.aspx
    >
    > Hope it also helps some.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    >
    > ==================================================
    >
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    > ications.
    >
    >
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/subscriptions/support/default.aspx.
    >
    > ==================================================
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    >
    > --------------------
    >>From: "SAL" <>
    >>References: <#>

    > <>
    >>Subject: Re: App load times slow on first start up
    >>Date: Mon, 29 Oct 2007 14:21:50 -0700
    >>Cold Fusion is, as I understand it, java byte code?
    >>
    >>I compiled the app on the server and it got a little faster but it's still
    >>pretty slow comparitively speaking. After the compile it went from 17
    >>seconds to 9 seconds to load.
    >>
    >>So, anytime the app site idle for a while, it's the slow startup times.
    >>Anybody else got any ideas?
    >>
    >>
    >>"Larry Bud" <> wrote in message
    >>news:...
    >>> On Oct 29, 12:38 pm, "SAL" <> wrote:
    >>>> I have an ASP.NET 2.0 app that takes about 17 seconds to load on first
    >>>> startup but then is very fast after that. As I understand it from some
    >>>> posts
    >>>> in June, this is caused by the loading of the App Domain.
    >>>> We have both Cold Fusion and ASP.NET apps on this server and the Cold
    >>>> Fusion
    >>>> apps do not display such slowness on their first start up of the day.
    >>>> Is
    >>>> there a way to improve the load times of ASP.NET apps?
    >>>> I'm having to justify to my boss about why this is occuring.
    >>>
    >>> The project is compiling the first time it's hit on your production
    >>> server.
    >>>
    >>> Cold Fusion isn't compiled code.
    >>>

    >>
    >>
    >>

    >
    SAL, Oct 30, 2007
    #6
  7. Hi SAL,

    Thanks for your reply.

    If midnigiht is a low loading time for your app, I think it should be
    reasonable and you can choose anytime the application will run under low
    volume. As mentioned in David's aritcle, proactive recycle will help
    release some performance pressure of the worker process. If you worry
    about hurting other applications running in the same worker process, you
    can consider put your application into a dedicated separate application
    pool(worker process).

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.



    --------------------
    >From: "SAL" <>
    >Subject: Re: App load times slow on first start up
    >Date: Tue, 30 Oct 2007 08:50:42 -0700


    >
    >Thanks Steven. I found the articles on IIS6 helpful indeed.
    >So, if I configure the app pool to only recycle around midnight, am I
    >hurting the server's overall performance for other applications you think?
    >


    >
    >
    >
    Steven Cheng[MSFT], Oct 31, 2007
    #7
  8. SAL

    Jack Jones Guest

    App load times slow on first start up (Solution)

    I had the same problem. The reason is that the application domain times out every 20 mins if there is no activity, the first request after the timeout can force a recompile and reload of cache. Changing some settings in the machine.config file will solve the problem; unfortunately for me my hosting provider would not allow me to make this change. I found this utility to be useful.

    http://www.spikesolutions.net/ViewSolution.aspx?ID=c2b7edc0-5de1-4064-a432-05f6eded3b82

    Essentially it "Pings" my home page every few mins so the application domain does not time out. The utility can also be configured to ping more than one page so that auxiliary pages are fast too.


    EggHeadCafe - .NET Developer Portal of Choice
    http://www.eggheadcafe.com
    Jack Jones, Nov 13, 2007
    #8
  9. SAL

    Guest

    On Oct 29, 10:38 am, "SAL" <> wrote:
    > I have anASP.NET2.0 app that takes about 17 seconds to load on first
    > startup but then is very fast after that. As I understand it from some posts
    > in June, this is caused by the loading of the App Domain.
    > We have both Cold Fusion andASP.NETapps on this server and the Cold Fusion
    > apps do not display such slowness on their first start up of the day. Is
    > there a way to improve the load times ofASP.NETapps?
    > I'm having to justify to my boss about why this is occuring.
    >
    > SAL


    I had the same problem. The reason is that the application domain
    times out every 20 mins if there is no activity, the first request
    after the timeout can force a recompile and reload of cache. Changing
    some settings in the machine.config file will solve the problem;
    unfortunately for me my hosting provider would not allow me to make
    this change. I found this utility to be useful.

    http://www.spikesolutions.net/ViewSolution.aspx?ID=c2b7edc0-5de1-4064-a432-05f6eded3b82

    Essentially it "Pings" my home page every few mins so the application
    domain does not time out. The utility can also be configured to ping
    more than one page so that auxiliary pages are fast too.
    , Nov 14, 2007
    #9
  10. SAL

    jturner Guest

    On 29 Oct, 22:39, (Steven Cheng[MSFT])
    wrote:
    > Hi SAL,
    >
    > As other members mentioned, for ASP.NET 2.0 web application, you can
    > perform precompilation on your web app so as to gain performance
    > improvement as precompiled application do not need additional dynamic page
    > code generation time. However, there are still startup time for
    > JIT-compiling .NET code into native code. For your scenario, if there is
    > no other particular long-run task at initialize time(such as the
    > application_Start event...), the startup slow should be caused by JIT
    > compile. How often will you notice this problem? I know that ASP.NET will
    > shutdown worker process after it hasn't been visited for a while. And you
    > can configure it to never shutdown through the following means:
    >
    > ** for IIS5 hosted scenario, you need to modify the <processModel> element
    > in machine.config , see:
    >
    > #Keeping Your ASP.NET Worker Processes Alivehttp://weblogs.asp.net/dmarsh/archive/2003/02/21/2758.aspx
    >
    > ** for IIS6, since it use application pool for each application virutal
    > dir, you need to turn off the shutdown setting in application pool setting.
    > You can find it in the "performance" tab:
    >
    > "shutdown worker process after being idle for xxxxxx time"
    >
    > also see "Idle timeout" in below reference:
    >
    > #Configure Application Pool Performance (IIS 6.0)http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Librar...
    > d3f37b8-c7ef-4a9c-9b78-eba9412181d8.mspx?mfr=true
    >
    > Here is also a good aritlce on IIS worker process recycle:
    >
    > http://blogs.msdn.com/david.wang/archive/2006/02/07/ASP-Startup-Shutd...
    > malies-on-IIS6.aspx
    >
    > Hope it also helps some.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    > ==================================================
    >
    > Get notification to my posts through email? Please refer tohttp://msdn.microsoft.com/subscriptions/managednewsgroups/default.asp...
    > ications.
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) athttp://msdn.microsoft.com/subscriptions/support/default.aspx.
    >
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    > -------------------->From: "SAL" <>
    > >References: <#>

    >
    > <>>Subject: Re: App load times slow on first start up
    > >Date: Mon, 29 Oct 2007 14:21:50 -0700
    > >Cold Fusion is, as I understand it, java byte code?

    >
    > >I compiled the app on the server and it got a little faster but it's still
    > >pretty slow comparitively speaking. After the compile it went from 17
    > >seconds to 9 seconds to load.

    >
    > >So, anytime the app site idle for a while, it's the slow startup times.
    > >Anybody else got any ideas?

    >
    > >"Larry Bud" <> wrote in message
    > >news:...
    > >> On Oct 29, 12:38 pm, "SAL" <> wrote:
    > >>> I have an ASP.NET 2.0 app that takes about 17 seconds to load on first
    > >>> startup but then is very fast after that. As I understand it from some
    > >>> posts
    > >>> in June, this is caused by the loading of the App Domain.
    > >>> We have both Cold Fusion and ASP.NET apps on this server and the Cold
    > >>> Fusion
    > >>> apps do not display such slowness on their first start up of the day. Is
    > >>> there a way to improve the load times of ASP.NET apps?
    > >>> I'm having to justify to my boss about why this is occuring.

    >
    > >> The project is compiling the first time it's hit on your production
    > >> server.

    >
    > >> Cold Fusion isn't compiled code.

    I had the same problem. The reason is that the application domain
    times out every 20 mins if there is no activity, the first request
    after the timeout can force a recompile and reload of cache. Changing
    some settings in the machine.config file will solve the problem;
    unfortunately for me my hosting provider would not allow me to make
    this change. I found this utility to be useful.

    http://www.spikesolutions.net/ViewSolution.aspx?ID=c2b7edc0-5de1-4064-a432-05f6eded3b82

    Essentially it "Pings" my home page every few mins so the application
    domain does not time out. The utility can also be configured to ping
    more than one page so that auxiliary pages are fast too.
    jturner, Dec 18, 2007
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    0
    Views:
    549
    Chris
    Jul 15, 2003
  2. Sara T.
    Replies:
    4
    Views:
    462
    Scott M.
    Jul 26, 2003
  3. z. f.
    Replies:
    1
    Views:
    3,570
    Anders Nor?s [MCAD]
    Dec 14, 2004
  4. Replies:
    3
    Views:
    3,007
  5. Peter Rank
    Replies:
    1
    Views:
    490
    Thomas Kellerer
    Dec 12, 2008
Loading...

Share This Page