Post subject: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Fri Jul 01, 2011 4:45 am
Win2008Workstation Expert
Joined: Sat Apr 10, 2010 8:56 am Posts: 554
Video Tutorial
Video is available in 1080p. Please view in full screen for optimal viewing experience.
What is Boot Optimization?
Boot Optimization, not to be confused with "boot optimization tools" is a newly revised feature of the windows defrag utility that improves the overall startup time of a machine.
How does it work?
This feature works by reducing the overall amount of time your machine spends locating non-contiguous boot files and startup items during the boot process. By ordering these files in a contiguous manner, your disk heads spend less time seeking and more time accessing resulting in a much faster boot time.
How To Enable Boot Optimization
1. Install Superfetch
Superfetch is needed to rebuild the Layout.ini file for boot optimization to cache startup applications AND boot files.
2. Download the BootOptimize.reg attachment below to enable the Boot Optimization feature. Note that you have only enabled the function and not actually used it yet!
3. Open Command Prompt. (Click start, type in cmd, and choose "Run as Administrator")
In command prompt type in the following command:
sc start defragsvc
This will start the Disk Defragmentation service.
Next type in the following command:
rundll32.exe advapi32.dll,ProcessIdleTasks
NOTE: This process takes roughly 10-15 minutes to complete!
This command will build the Layout.ini located in C:\Windows\Prefetch. It will build a "database" of optimized files that is passed on to the disk defrag service will which complete the process.
According to our good friend Wikipedia:
"Every three days, when the machine is idle, a list of files and directories that are referenced during the boot process and application startups is created. This list is stored in Layout.ini in the Prefetch directory, and is subsequently passed to the Disk Defragmenter, instructing it to place all the files in sequential order on the physical hard drive, which will further improve startup performance, as Windows will spend less time waiting for the hard drive's heads to move to the relevant data. Alternatively, running "Defrag.exe %systemdrive% -b" from the command line forces a defragmentation of the prefetcher files without requiring a full Defragmentation"
TIP: Use Resource Monitor to track when this command has completed. You can tell when this command is complete based on the amount of disk thrashing in Resource Monitor. For example when you run the command you will see your Disk usage go up to say "10 MB/sec" and it will stay in MB range until it completes. When it completes your disk usage will go down to the KB range, signifying to you that the process has been completed.
To open Resource Monitor, click on Start and type in "Resource Monitor". Then in Resource Monitor ensure that the "overview" tab is selected. On the right-side, look for "Disk". You should see the current disk activity in KB or MB/sec. For example 100 KB/sec.
4. While still in command prompt, type in the following command:
defrag C: /b
Assuming C: is the drive letter of your operating system. If it is E: for example you would type in defrag E: /b
You will receive a message saying "Invoking Boot Optimization..."
The process should take 10-20 minutes depending on your hardware specs and speed of your hard disk. When you are able to type in commands into command prompt the process is complete.
Your computer will need to be restarted 6 times (not joking) in total for Windows to successfully learn the status of your boot files and build a sufficient database of prefetched files. If completed successfully after a few reboots you should notice a drastic reduce in boot time! You should notice a change by the 3rd reboot.
You do not have the required permissions to view the files attached to this post. _________________
Last edited by halladayrules on Sun Aug 14, 2011 7:45 am, edited 8 times in total.
sythrar
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Mon Jul 04, 2011 4:24 am
Win2008Workstation Member
Joined: Sun Jan 18, 2009 11:19 am Posts: 17
Hi halladayrules, need Superfetch service ?
halladayrules
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Mon Jul 04, 2011 5:05 am
Win2008Workstation Expert
Joined: Sat Apr 10, 2010 8:56 am Posts: 554
sythrar wrote:
Hi halladayrules, need Superfetch service ?
You might I'm not sure though. It's a separate feature of 7 but im not sure if it utilizes the caching feature of Superfetch or uses another utility altogether.
_________________
sythrar
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Sat Jul 09, 2011 6:33 am
Win2008Workstation Member
Joined: Sun Jan 18, 2009 11:19 am Posts: 17
I made some tests and need Superfetch service, but look error:
Quote:
Invoking boot optimization on (C:)...
Analysis: 100% complete.
Some registry entries were missing from the boot optimization section of the reg istry. (0x89000017)
Lacks some register, create in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction NAME - TYPE - DATA Enable - REG_SZ - Y LcnEndLocation - REG_SZ - LcnStartLocation - REG_SZ -
Look, now:
Quote:
Invoking boot optimization on (C:)...
Pre-Defragmentation Report:
Volume Information: Volume size = 241,73 GB Free space = 220,15 GB Total fragmented space = 0% Largest free space size = 105,95 GB
Note: File fragments larger than 64MB are not included in the fragmentat ion statistics.
The operation completed successfully.
Post Defragmentation Report:
Volume Information: Volume size = 241,73 GB Free space = 220,15 GB Total fragmented space = 0% Largest free space size = 74,76 MB
Note: File fragments larger than 64MB are not included in the fragmentat ion statistics.
Boot time: 68s to 45s -> normal defragmentation 45s to 38s -> Superfetch + boot optimization + bare-bone services
Ty halladayrules, for good found
halladayrules
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Sun Jul 10, 2011 12:35 pm
Win2008Workstation Expert
Joined: Sat Apr 10, 2010 8:56 am Posts: 554
I got same 0x89000017 error code, you just need to rerun the "Rundll32.exe advapi32.dll,ProcessIdleTasks" command once more and then "defrag C: /b" again and it will work.
_________________
Arris
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Wed Jul 13, 2011 10:34 pm
Win2008Workstation Admin
Joined: Sat Mar 08, 2008 5:10 pm Posts: 1065 Location: The Netherlands
Nice finding again, halladayrules! You keep amazing me!
Added a link to your well-explaining steps to the win2008r2workstation.com main page under step 19 so more people will be able to find it.
_________________ |[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 ]|
halladayrules
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Fri Jul 15, 2011 1:26 pm
Win2008Workstation Expert
Joined: Sat Apr 10, 2010 8:56 am Posts: 554
sythrar wrote:
Hi halladayrules, need Superfetch service ?
I have recently discovered that Superfetch is required to rebuild the Layout.ini file which the defrag service uses to optimize your boot files AND startup apps.
_________________
Last edited by halladayrules on Sat Jul 23, 2011 10:08 pm, edited 1 time in total.
poisedforflight
Post subject: Re: Tip: Enable Windows 7 Boot Optimization Function in R2
Posted: Wed Jul 20, 2011 3:43 am
Joined: Wed Jul 20, 2011 12:32 am Posts: 2
I am getting the following error after trying the above steps:
Quote:
Invoking boot optimization on (C:)...
Analysis: 100% complete.
Boot optimization has been disabled in the registry. (0x89000018)
My RegKey looks as so after running the defrag c: /b
Rerun "Rundll32.exe advapi32.dll,ProcessIdleTasks" and try again. It should work. The boot optimization does not work on SSDs from what I can gather, if you have an SSD it will not work.
Also try this:
Right-click on "BootOptimizeFunction" key and go to permissions. Add your username and give yourself full control. Exit command prompt. Then re-enter it again.
Rerun "Rundll32.exe advapi32.dll,ProcessIdleTasks" and try again. It should work. The boot optimization does not work on SSDs from what I can gather, if you have an SSD it will not work.
Also try this:
Right-click on "BootOptimizeFunction" key and go to permissions. Add your username and give yourself full control. Exit command prompt. Then re-enter it again.
Users browsing this forum: No registered users and 2 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