Windows Vista Forums

ngen and performance questions
  1. #1


    jmagaram Guest

    ngen and performance questions

    I'm thinking of using ngen to improve start up performance of my .net
    service. I have seen it fail to start with a 30 second timeout error on boot,
    without even getting to the first line of code. This happens on slow
    computers, especially with anti-virus software installed.



    QUESTION: The documentation says I need to pick non-overlapping baseaddresses.
    Even if the base addresses I pick don't conflict with eachother, is it
    possible that the base addresses will conflict with another application on
    the computer? If so, isn't using ngen a futile effort because I have no
    control over the base addresses used my other programs.

    QUESTION: I think I need to measure the time it takes my service to start
    during boot. If I try to start my service manually later, it starts very fast
    - maybe 1 or 2 seconds. For some reason the cold start at boot is much
    slower, occasionally longer than 30 seconds. I want to measure whether the
    changes I make improve start up time but don't know how to measure it. I've
    measured the time from the first line in Main() to the end of OnStart but
    this clearly isn't the right metric, because it can be more than 30 seconds
    without causing a timeout. And there are times I've gotten the timeout error
    without the first line of Main() being invoked.

      My System SpecsSystem Spec

  2. #2


    John Vottero Guest

    Re: ngen and performance questions

    Is your executable digitally signed? If so, see:

    http://support.microsoft.com/kb/936707


    "jmagaram" <jmagaram@xxxxxx> wrote in message
    news:2F9479E3-61FF-4FD5-8F95-959F35B869AB@xxxxxx

    > I'm thinking of using ngen to improve start up performance of my .net
    > service. I have seen it fail to start with a 30 second timeout error on
    > boot,
    > without even getting to the first line of code. This happens on slow
    > computers, especially with anti-virus software installed.
    >
    > QUESTION: The documentation says I need to pick non-overlapping
    > baseaddresses.
    > Even if the base addresses I pick don't conflict with eachother, is it
    > possible that the base addresses will conflict with another application on
    > the computer? If so, isn't using ngen a futile effort because I have no
    > control over the base addresses used my other programs.
    >
    > QUESTION: I think I need to measure the time it takes my service to start
    > during boot. If I try to start my service manually later, it starts very
    > fast
    > - maybe 1 or 2 seconds. For some reason the cold start at boot is much
    > slower, occasionally longer than 30 seconds. I want to measure whether the
    > changes I make improve start up time but don't know how to measure it.
    > I've
    > measured the time from the first line in Main() to the end of OnStart but
    > this clearly isn't the right metric, because it can be more than 30
    > seconds
    > without causing a timeout. And there are times I've gotten the timeout
    > error
    > without the first line of Main() being invoked.

      My System SpecsSystem Spec

  3. #3


    jmagaram Guest

    Re: ngen and performance questions

    No it isn't signed

    "John Vottero" wrote:

    > Is your executable digitally signed? If so, see:
    >
    > http://support.microsoft.com/kb/936707
    >
    >
    > "jmagaram" <jmagaram@xxxxxx> wrote in message
    > news:2F9479E3-61FF-4FD5-8F95-959F35B869AB@xxxxxx

    > > I'm thinking of using ngen to improve start up performance of my .net
    > > service. I have seen it fail to start with a 30 second timeout error on
    > > boot,
    > > without even getting to the first line of code. This happens on slow
    > > computers, especially with anti-virus software installed.
    > >
    > > QUESTION: The documentation says I need to pick non-overlapping
    > > baseaddresses.
    > > Even if the base addresses I pick don't conflict with eachother, is it
    > > possible that the base addresses will conflict with another application on
    > > the computer? If so, isn't using ngen a futile effort because I have no
    > > control over the base addresses used my other programs.
    > >
    > > QUESTION: I think I need to measure the time it takes my service to start
    > > during boot. If I try to start my service manually later, it starts very
    > > fast
    > > - maybe 1 or 2 seconds. For some reason the cold start at boot is much
    > > slower, occasionally longer than 30 seconds. I want to measure whether the
    > > changes I make improve start up time but don't know how to measure it.
    > > I've
    > > measured the time from the first line in Main() to the end of OnStart but
    > > this clearly isn't the right metric, because it can be more than 30
    > > seconds
    > > without causing a timeout. And there are times I've gotten the timeout
    > > error
    > > without the first line of Main() being invoked.
    >
    >

      My System SpecsSystem Spec

ngen and performance questions problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions, questions, questions... on how to improve Jacob Saaby Nielsen PowerShell 7 11 Dec 2007
performance monitor: low performance on windows aero HAL9000 Vista performance & maintenance 7 26 Nov 2007
General System Performance Questions/Issues John C Harris Vista General 6 05 Jun 2007
PS is not NGen-ed on installation. Why? =?Utf-8?B?Um9tYW4gS3V6bWlu?= PowerShell 2 11 Aug 2006
NGEN.exe =?Utf-8?B?QWxlYw==?= Vista performance & maintenance 0 30 Jul 2006