Login    
   Windows Server to Workstation
   Convert Windows Server 2008/2008 R2/2012 to a Workstation!
    Register FAQ  •  Search    
It is currently Fri May 24, 2013 2:01 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Configuring Services to Reduce Boot Time
PostPosted: Tue Jan 04, 2011 5:30 pm 
Offline
Win2008Workstation Expert
Win2008Workstation Expert

Joined: Sat Apr 10, 2010 8:56 am
Posts: 554
I have been playing around with many different configurations in MSCONFIG/services.msc in the efforts of finding an optimal boot time on my machine without sacrificing operation of services on my computer. I think a lot of us, especially the average PC user are not 'in the know' about what is really going on behind the kernel when Windows begins to load all these services, drivers, and programs. Most of us just assume that operating systems from Vista on up have an unusually higher boot time due to the amount of services starting up, in contrast to XP which has literally half that mark.

I came across an interesting discovery regarding the services of my 2008 box. I noticed that even though I may have quite a large amount of processes (and services) running after my computer boots up, the truth be told that only a limited amount of services initially start up before the desktop appears. This is due to the fact that many services in Windows have dependices (i.e service #2 cannot start unless service #1 is started first). For example, MSFTPSVC depends on IISADMIN and IISADMIN depends on Security Accounts Manager.

What I had done is the following. First I rebooted my machine and the moment the desktop appeared I launched MSCONFIG and clicked on the services tab. After that I filtered the service status for RUNNING only. With the system up time of my machine under 40 seconds I took a note of the services running. This is what I call my initial snapshot footprint:

Here's a list of services i found running initially:

-Application Experience
-Application host Helper Service
-Windows Audio Endpoint Builder
-Windows Audio
-Base Filtering Engine
-DHCP Client
-DNS Client
-Diagnostic Policy Service
-Function Discovery Resource Publication
-Windows Presentation Foundation
-Group Policy Client
-IKE and AuthIP IPSEC Keying Modules
-Multimedia Class Scheduler
-Net.tcp Port Sharing Service
-Network Location Awareness
-Network Store Interface Service
-NVIDIA Driver Helper Service
-PnkBstrA
-IPsec Policy Agent
-Remote Registry
-Secondary Logon
-Shell Hardware Detection
-Print Spooler
-Tablet PC Input Service
-Themes
-Desktop Window Manager Session
-WebClient
-Windows Defender

Thats 28 services when my machine initially starts up. After my machine has loaded for 2 minutes or so the amount of services that is running on my machine goes up from 28 to 50 services. So its the not 50 services I should be focusing my attention on disabling but rather the 28 services instead. They are the "initial services" that boot up which is causing the bulk of my boot time to suffer. After this I decided to one by one experiment by manually disabling each service in MSCONFIG. After mucking around with a few services I was able to figure out what was taking up the hugest chunk of my boot time.

The guilty culprits on my specific machine are:

-COM+ Event System
-Windows Event Log
-Security Accounts Manager
-Windows Firewall
-System Event Notification Service
-Windows Time
-Windows Management Instrumentation
-Function Discovery Provider
-Function Discovery Resource
-Workstation
-Server
-TCP/IP NETBIOS
-MY ANTIVIRUS service (ESET)

I created a logoff script which disables these specific services when the computer reboots these services do not run. I then creating a logon batch script which then begins to automatically load these services in the background after the desktop is loaded. The only drawback to manually loading these services after windows logins is that any service which depends on any of the above "guilty culprits" must also be manually started in my batch file as well. For example the Task Scheduler service is set to Automatic but it depends on the Windows Event Log service to be running. Even though it is set to automatic it doesn't "automatically" run the service even after the computer has been logged on. I think this is due to the fact that I have instructed the Windows Event Log service to start AFTER the Windows Explorer/desktop has appeared. Most of the services that were set to Automatic that depended on these core intial services started up with the exception of three. I was able to figure out which services were not starting up by going to Services.msc console and filtering for "Automatic" then seeing which automatic services were not started. I added the services to manually start to end of my logon script.

sc start iisadmin
sc start msftpsvc
sc start scheduler


Keep in mind that the above configuration which I have mentioned is specific to my Server 2008 machine. Disabling my "guilty culprit services" on Server 2008 R2 will not have the same effect on your machine as you have different services running on your machine than I have on mine. For example you may have an iTunes service running via the iTunes application you downloaded earlier and this particular service just happens to be running on the initial startup.

I plan to dual boot Windows Server 2008 R2 on my hard drive in the near future and use some detective work to find out which services are eating up the bulk of our boot time under a baseline R2 install. The idea is to find out what is eating up the bulk of our boot time BEFORE you begin to load the OS down with 3rd party softwares, Windows Updates, what not. As new services begin to appear on your computer you will be able to tell if its having an adverse effect on your boot time! For example if I tweak Server 2008 R2 to boot up in 32 seconds and you install iTunes software (iTunes service) and your boot time goes up to 38 seconds, you can pinpoint iTunes as the source of the problem. This is all in an experimental phase but I'm hoping to see some positive results from my findings!

_________________
Image


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Thu Jan 06, 2011 12:14 pm 
Offline
Win2008Workstation Expert
Win2008Workstation Expert

Joined: Sat Apr 10, 2010 8:56 am
Posts: 554
Well I've completed my testing and here's my results:

Normal startup under MSCONFIG: 42.650 seconds
Normal startup w/tweaked settings: 29.472 seconds

Times according to PC Boot Timer.

The features I had installed before performing this test were: .NET Framework 3.5, Desktop Experience, Windows Server Backup, Wireless LAN.

Windows Aero was enabled using the default 7 theme.

I have run similar settings under my 32-bit server 2008 box with better results but both OS showed noticeable improvements.

How to apply my tweak

Download the zipped folder (attached below). Extract the contents. Inside you will find serviceson.bat, servicesoff.bat, restoreservices.bat.

Create a logoff and logon policy with the servicesoff.bat and serviceson.bat

Start > gpedit.msc > User Configuration > Windows Settings > Scripts (logon/logoff)

Click Logoff.

Click Add...

in script name type in the path of the servicesoff.bat file. I placed serviceson and servicesoff.bat in my system32 folder so my path for logoff would be c:\windows\system32\servicesoff.bat

Repeat this same process for logon except name you will use the path c:\windows\system32\serviceson.bat

What is restoreservices.bat?

Restoreservices.bat is a fail-safe I have written that changes all of services on the machine back to its original factory setting. If you for some reason feel that the tweak is nothing benefiting your particular machine (which can be possible because this tweak is meant for dual-core and up machines) you can easily remove it by removing the logoff and logon scripts and launching restoreservices.bat. Then simply restart and you are back to the way you were before you applied my tweak!

What did you like about this tweak?

Mostly the fact that it shaved close to 15 seconds off my boot time. Another plus is that you do not sacrifice the operations of any services on your computer. After your machine has booted to the desktop, within the first 5 minutes your machine is operating as if you never turned anything off. The only difference is we are delaying the critical services that are causing your increased boot time, then starting the services AFTER windows starts.

Why not just change the service to Automatic (delayed start)?

This is a possibility and if you change the services to delayed start you will still see the same desired results. My problem with this setting is that it delays your services for 2 minutes. One of the services I have disabled which eats boot time is Security Accounts Manager which is a parent service that is required to run Network and Sharing Center. If you wish to run network and sharing center, you have to wait a few minutes. The disabling and re-enabling method is able to process the services faster for some reason.

How does your tweak restore all my services to normal?

I have reviewed these scripts over many of times for spelling and grammar mistakes and especially to make sure that all of the dependent services are launched BEFORE the child services. For example if you launch Task Scheduler before Windows Event Log, the service will change to automatic but it will not start because the service it depends on (event log) has not been started first. I went through each line on the script to make sure all the dependencies were met.

What do you not like about your tweak?

It's really hardware dependent. If you have a machine with a 5400 RPM HDD for example and a 1GB of RAM with a low end dual core CPU, the batch processing which takes place will be a tad slower then others with higher end performance parts. Another disadvantage of the logoff script it that it takes a few seconds to process, so when you want to logoff your machine it will take a few seconds longer.


What problems did you come across (if any) with your tweak?

I followed a strict pattern of how I approached this tweak. I set a strict guideline on how I ran everything for example I decided to keep MSCONFIG out of the picture. It was for good reason. I come to find out that after testing (which was successful) i decided to disable some useless services via the msconfig method. For some reason this broke the integrity of my script and my boot time skyrocketed (48 seconds)! I'm not sure if Windows got confused on whether or not MSCONFIG was handing the startup of the service or my script. Or it could have been that they were both trying to process at same time which caused the lengthy boot time. I decided to re-install R2 again and re-apply my tweak to the previous method I had used. By disregarding MSCONFIG I was able to achieve consistency with the boot time.


What should I know before removing this tweak?

If you decide to return back to your original configuration or would like to use the MSCONFIG method again it is important that you follow the below procedure in this exact order or you risk breaking the integrity of your server (like I did :lol: ). I was able to catch my error so as long as you follow the procedure...IN ORDER!!!... you should have no problems at all.

Step 1: Remove logoff and logon scripts from Group Policy.
Step 2: Reboot
Step 3: Launch restoreservices.bat
Step 4: Reboot
Step 5: Start MSCONFIG, go to services tab. Click disable all. Apply and restart.
Step 6: Start MSCONFIG, go to services tab. Click on enable all. Apply and restart.

To give you an idea how much of a marked improvement this tweak has been on my 32-bit Server 2008 machine I have set up a few scenarios to demonstrate. With the help of eBoostr and my tweak i was able to achieve some sick results.

I edited my logon script to launch a variety of applications on startup.

Image

In my first scenario: Chrome, Notepad, Calculator, WMP, Powerpoint, Word, Excel were all launched. The up time showed 29 seconds.

Image

In my second scenario I launched 25 instances of Internet Explorer. The up time showed 34 seconds. Impressed?!

Image

In my third scenario I launched 100 instances of notepad. The up time showed 30 seconds. Nice huh?

For those willing to try out my tweak, follow my recommendations below so we can provide a benchmarking comparison of everyones machine to see how much of an effect it is having.

1. Download PC Boot Timer: http://download.cnet.com/PC-Boot-Timer/ ... 45234.html

2. Run PC Boot Timer with all your services enabled (before tweak).

3. Record your boot time.

4. Apply the tweak above and re-run PC Boot Timer again.

5. Record your new boot time.

Kind of like I did at the way top of this post. Sort of like a before and after snapshot.

_________________
Image


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Fri Jan 07, 2011 12:28 am 
Offline
Win2008Workstation Admin
Win2008Workstation Admin
User avatar

Joined: Sat Mar 08, 2008 5:10 pm
Posts: 1065
Location: The Netherlands
You keep amazing me with your benchmarks, tricks and guides! :geek: Great job! :) I added a link to this topic at the Fine-Tuning Services in the Windows Server 2008 manual. 8-)

_________________
|[ Mainboard: Gigabyte GA-M56S-S3 ]|[ CPU: AMD Athlon 64 X2 6000+ ]|[ RAM: 4096 MB (DDR2-800 SDRAM) ]|[ GPU: NVIDIA GeForce 8600 GT (256 MB) ]|[ OS: Microsoft Windows Server 2008 R2 Enterprise ]|


Last edited by Arris on Sun Feb 13, 2011 12:51 pm, edited 1 time in total.
Reason: Avoid confusion


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Fri Jan 07, 2011 5:20 am 
Offline
Win2008Workstation Expert
Win2008Workstation Expert

Joined: Sat Apr 10, 2010 8:56 am
Posts: 554
Arris wrote:
You keep amazing me with your benchmarks, tricks and guides! :geek: Great job! :) I added a link to this topic at the Fine-Tuning Services in the Windows Server 2008 manual. 8-) I also moved your topic to the non-R2 section because it seems you currently only tested it on Windows Server 2008.


Hi, Arris

Thanks! The tweak I provided was configured around a Server 2008 R2 installation as evidenced by the RPC Endpoint Mapper (rpceptmapper) service in the script (not available on 2008). I have a similar script on my 2008 box, which for some reason is the fastest for me. To give you an example i used the same eboostr program on R2 and even though it booted up in 25 seconds (2 seconds faster than 2008) it took a little while to load IE. The machine booted up in 25 seconds, but IE didn't load until 36 seconds. On Server 2008 it loads almost instantly. IE is just not the only example... Word, Excel, Powerpoint, WMP, Chrome all load slower as the machine is booting up. HOWEVER if I let both machines idle for a few minutes and then launch these same programs...the startup time is the same. I like my server 2008 box because its ready to go right now.

_________________
Image


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Fri Jan 07, 2011 10:28 am 
Offline
Win2008Workstation Expert
Win2008Workstation Expert

Joined: Sat Apr 10, 2010 8:56 am
Posts: 554
I figured out what was causing my abnormal boot time when configuring with MSCONFIG. Turns out that Windows was setting my logon script to run synchronously. In other Windows Explorer will not start until the script is finished running. We don't want that.

If this ever happens to you, go to User Configuration > Administrative Templates > System > Scripts > Run logon scripts synchronously

Disable it.

I was able to tweak my 2008 box even further by turning on some more services that I don't need. Check out this boot time!

Image

Every day when I wake up I power on my desktop and head to the bathroom. When I am done peeing I sit back down on my chair and wait for the remainder of Server to load. Now Server is already loaded. I can't pee faster than Server can load! :lol: Gotta love Server 2008.

_________________
Image


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Sun Feb 13, 2011 1:44 pm 
Offline
Win2008Workstation Admin
Win2008Workstation Admin
User avatar

Joined: Sat Mar 08, 2008 5:10 pm
Posts: 1065
Location: The Netherlands
halladayrules wrote:
Thanks! The tweak I provided was configured around a Server 2008 R2 installation as evidenced by the RPC Endpoint Mapper (rpceptmapper) service in the script (not available on 2008).
Ah, I see :) Moved your topic back to the R2 forum, and moved the reference from the Services page in the 2008 manual to the front page of the R2 manual. ;)

halladayrules wrote:
I have a similar script on my 2008 box, which for some reason is the fastest for me. To give you an example i used the same eboostr program on R2 and even though it booted up in 25 seconds (2 seconds faster than 2008) it took a little while to load IE. The machine booted up in 25 seconds, but IE didn't load until 36 seconds. On Server 2008 it loads almost instantly. IE is just not the only example... Word, Excel, Powerpoint, WMP, Chrome all load slower as the machine is booting up. HOWEVER if I let both machines idle for a few minutes and then launch these same programs...the startup time is the same. I like my server 2008 box because its ready to go right now.
Could you also post these scripts so non-R2 users are also able to quickly optimize their OS' startup time? :geek: I will then add a direct link to the Fine-tuning Service page because this list of services is static anyway.

halladayrules wrote:
Every day when I wake up I power on my desktop and head to the bathroom. When I am done peeing I sit back down on my chair and wait for the remainder of Server to load. Now Server is already loaded. I can't pee faster than Server can load! :lol: Gotta love Server 2008.
Haha nice! :mrgreen:

_________________
|[ Mainboard: Gigabyte GA-M56S-S3 ]|[ CPU: AMD Athlon 64 X2 6000+ ]|[ RAM: 4096 MB (DDR2-800 SDRAM) ]|[ GPU: NVIDIA GeForce 8600 GT (256 MB) ]|[ OS: Microsoft Windows Server 2008 R2 Enterprise ]|


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Tue Feb 22, 2011 12:42 am 
Offline
Win2008Workstation Expert
Win2008Workstation Expert
User avatar

Joined: Thu Feb 05, 2009 11:27 am
Posts: 365
Nice share !

We'll fix those in R2ConvGUI !

TY.

Regards,

N & Team 8-)

_________________
|"It's a basic truth of the human condition that everybody lies. The only variable is about what."|


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Tue Feb 22, 2011 10:14 am 
Offline

Joined: Thu Mar 05, 2009 2:37 pm
Posts: 2
Hey, firstly thank you for the work with the scripts, I found them really helpful. However..

halladayrules wrote:
Why not just change the service to Automatic (delayed start)?

This is a possibility and if you change the services to delayed start you will still see the same desired results. My problem with this setting is that it delays your services for 2 minutes. One of the services I have disabled which eats boot time is Security Accounts Manager which is a parent service that is required to run Network and Sharing Center. If you wish to run network and sharing center, you have to wait a few minutes. The disabling and re-enabling method is able to process the services faster for some reason.



.. I didn't find this to be the case with my R2 (web server) installation? In fact, quite the opposite, when enabling the services through the bat file they would take 2 minutes to enable, but with automatic (delayed start) they would start virtually straight after logging into Windows. This is especially noticeable with Sandboxie for example, it briefly flashes an exclamation mark in the task bar to say service couldn't be loaded which then corrects itself as the service becomes available; also with my wifi connection, it briefly flickers as if it can't find connection and then the service kicks in and all is fine. However, with the bat for both of these services, in particular wifi isn't available for around 2 minutes.. maybe I'm missing something?


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Wed Feb 23, 2011 4:28 am 
Offline
Win2008Workstation Expert
Win2008Workstation Expert

Joined: Sat Apr 10, 2010 8:56 am
Posts: 554
Tigerite wrote:
Hey, firstly thank you for the work with the scripts, I found them really helpful. However..

halladayrules wrote:
Why not just change the service to Automatic (delayed start)?

This is a possibility and if you change the services to delayed start you will still see the same desired results. My problem with this setting is that it delays your services for 2 minutes. One of the services I have disabled which eats boot time is Security Accounts Manager which is a parent service that is required to run Network and Sharing Center. If you wish to run network and sharing center, you have to wait a few minutes. The disabling and re-enabling method is able to process the services faster for some reason.



.. I didn't find this to be the case with my R2 (web server) installation? In fact, quite the opposite, when enabling the services through the bat file they would take 2 minutes to enable, but with automatic (delayed start) they would start virtually straight after logging into Windows. This is especially noticeable with Sandboxie for example, it briefly flashes an exclamation mark in the task bar to say service couldn't be loaded which then corrects itself as the service becomes available; also with my wifi connection, it briefly flickers as if it can't find connection and then the service kicks in and all is fine. However, with the bat for both of these services, in particular wifi isn't available for around 2 minutes.. maybe I'm missing something?


Hello Tigerite,

Thanks for your response. The reason why I believe some of the series do not start in a timely fashion is the fact there dependencies are not started until after the machine logins. For example the Wireless LAN service which depends on Extensible Authentication Protocol is one of the services set to disabled in my tweak and even though you start it up Wireless LAN (wlansvc) remains stopped despite it set to Automatic. You are running the web edition of R2 so there might be additional services which depend on some of the services I have had you manually disable in the servicesoff.bat file. My recommendation for you is to edit the serviceson.bat file in c:\windows\system32 and manually start the services in the script at the bottom.

1. Reboot your machine.

2. Click on Start > Administrative Tools > Services

3. Click on the "Startup Type" field to sort the services. Look at the Automatic field and locate the services which have been set to Automatic but are not "started".

4. Click on the offending service.

5. Locate the "service name"

6. Edit the c:\windows\system32\serviceson.bat file manually in notepad. Start the service by typing in the following code:

sc start service_name; where service_name is the name located in "service name"

Example: If the Wireless LAN Service is not started you would add the following line at the bottom of serviceson.bat

sc start wlansvc

Do this for all the other services that are set to "Automatic" that have not been started.

_________________
Image


 Profile  
 Post subject: Re: Configuring Services to Reduce Boot Time
PostPosted: Sat Mar 05, 2011 9:02 am 
Offline
Win2008Workstation Expert
Win2008Workstation Expert

Joined: Sat Apr 10, 2010 8:56 am
Posts: 554
I have attached below the services tweak configuration files that I use for my 2008 machine. It works on both 2008 and R2. It includes Wireless support.


You do not have the required permissions to view the files attached to this post.

_________________
Image


 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
phpBB skin developed by: John Olson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[ Time : 0.064s | 14 Queries | GZIP : Off ]