117

What is the difference between Automatic and Automatic (Delayed Start) for a property setting for a Windows service? i.e. what do I gain or lose by setting my service as one or the other?

Running the service on Windows Server 2008 x64

2

5 Answers 5

137

A service marked as Automatic (Delayed Start) will start shortly after all other services designated as Automatic have been started. In my experience, this means that they are started 1-2 minutes after the computer boots.

The setting is most useful in lessening the "mad rush" for resources when a machine boots.

Note that when you have 20 services all being started at the same time, each will start up slower as it competes with the others for slices of the machine's precious resources (CPU/RAM/Disk/Network). That is, each service takes longer to become available!

If you have a few services that are critical, then you may want to set those few to Automatic and set as many of the others as you can to Automatic (Delayed Start). This will ensure that the critical services get the most resources early and become available sooner, while the non-critical services start a bit later (which by definition is ok).

6
  • 51
    Indeed, after handling the Non-Delayed Start services it will queue a worker thread which has a default delay of 120 seconds, which can be overridden by the AutoStartDelay value in HKLM\SYSTEM\CurrentControlSet\Control. When this worked thread runs the Delayed Start services are handled and when they are done the SCM signals the event \BaseNamedObjects\SC_AutoStartComplete... May 20, 2011 at 23:05
  • 15
    Further to @TomWijsman, you can apparently set the delay on a service-by-service basis by adding a DWORD for HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay.
    – Stajs
    Jul 26, 2016 at 3:25
  • @Stajs Does this work only in Windows Server? I tried it in Windows 10 Pro and it did nothing. Btw your link is broken.
    – Youda008
    Jun 23, 2021 at 19:47
  • @Youda008 Yes, this was Windows Server 2008 at the time of the comment and I don't know if it works on Windows 10. Archive.org has saved a copy of the link.
    – Stajs
    Jun 24, 2021 at 23:58
  • @Stajs's link has gone dead, here is the web archive copy of the link: web.archive.org/web/20160205094320/http://www.ca.com/us/support/…
    – Tim Mackey
    Sep 24, 2022 at 23:36
8

From my understanding, it's simply a delay before launching the service.

Later versions of Windows introduced this to ensure that they didn't trip over each other's feet during the boot process (having a gazillion processes starting up at the same time is not conducive to performance).

The documentation for this feature states that services marked thus will be started "shortly after boot", hopefully once the boot-time-required services have settled down a little.

1

This is mostly used for services that starts on with AD accounts. If the service is trying to start before the server has network connection to contact the DC, it will fail and sometimes the system gets stuck and gets unreachable.

The delay ensures the service will start once network connection is up in order to use the AD account for it.

1
  • Couldn't you make a dependency on the service that gets into AD? I don't know what it is, but that seems like it would be more robust.
    – teeks99
    Aug 27, 2022 at 12:19
0

This is also used when you want to delay the start of a service to allow other services to start completely, such as the SCCM Client, which does a delayed start to allow the WMI service to start fully as it is dependent on it being fully up and running.

1
  • 2
    I'll note that such a requirement is a sign of negligence on the part of the service author. The correct way to solve such a problem is to use an explicit service dependency.
    – Brian
    Sep 9, 2019 at 21:03
-4

Here's an example. I have a SonarQube service that depends on my MySQL database service. So, I set the MySQL service to automatic to get the database up and running when the machine boots. I have the SonarQube service set to the automatic (delayed) start to make sure it starts up AFTER the database service it depends upon is started.

If you have a dependency like this it can be helpful to use the delayed start to make sure dependent services start up in the right order.

4
  • 16
    If you have a dependency like this, the correct way to handle it is to explicitly configure a service to depend on the other one, rather than waiting a couple of minutes and hoping it has started.
    – Massimo
    Jul 20, 2016 at 22:06
  • Thanks. Perhaps you can explain how to do that? And, seems that if it works it is correct. Maybe what you recommend is "better", which I wouldn't disagree with? Jul 30, 2016 at 14:58
  • 3
    See here: serverfault.com/questions/24821/….
    – Massimo
    Jul 30, 2016 at 16:36
  • Both these are quick and dirty fixes to a much broader problem. What if your database is moved to another computer or what if you change the type of database engine? Oct 8, 2022 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .