Tip: Enable Windows 7 Boot Optimization Function in R2

Forums Operating Systems Windows Server 2008 R2 Miscellaneous Tip: Enable Windows 7 Boot Optimization Function in R2

Viewing 14 reply threads
  • Author
    Posts
    • #51853

      Hi halladayrules, need Superfetch service ?

    • #51854

      @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.

    • #51848

      I made some tests and need Superfetch service, but look error:

      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_MACHINESOFTWAREMicrosoftDfrgBootOptimizeFunction
      NAME – TYPE – DATA
      Enable – REG_SZ – Y
      LcnEndLocation – REG_SZ –
      LcnStartLocation – REG_SZ –

      Look, now:

      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 😀

    • #51849

      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.

    • #51852
      Arris
      Moderator

      Nice finding again, halladayrules! 🙂 You keep amazing me! :geek:

      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. 😉

    • #51855

      @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.

    • #51850

      I am getting the following error after trying the above steps:

      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

      Windows Registry Editor Version 5.00

      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftDfrgBootOptimizeFunction]
      “Enable”=”Y”
      “OptimizeComplete”=”No”
      “OptimizeError”=”Missing Registry Entries”

      Anyone have any ideas?

    • #51851

      @poisedforflight wrote:

      I am getting the following error after trying the above steps:

      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

      Windows Registry Editor Version 5.00

      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftDfrgBootOptimizeFunction]
      “Enable”=”Y”
      “OptimizeComplete”=”No”
      “OptimizeError”=”Missing Registry Entries”

      Anyone have any ideas?

      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.

      Type in

      Rundll32.exe advapi32.dll,ProcessIdleTasks
      defrag C: /b

      try once again if it doesn’t work the first time.

    • #51856

      It looks like all I was missing was the prefetch function. It’s working great now, no errors.

      @halladayrules wrote:

      @poisedforflight wrote:

      I am getting the following error after trying the above steps:

      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

      Windows Registry Editor Version 5.00

      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftDfrgBootOptimizeFunction]
      “Enable”=”Y”
      “OptimizeComplete”=”No”
      “OptimizeError”=”Missing Registry Entries”

      Anyone have any ideas?

      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.

      Type in

      Rundll32.exe advapi32.dll,ProcessIdleTasks
      defrag C: /b

      try once again if it doesn’t work the first time.

    • #51857

      I have uploaded my video tutorial for this feature on the main page of this topic. Enjoy!

    • #51858

      just wanted to say thanks for this 😀

      great work 😀

      Vinda

    • #51859

      Hi,

      I followed your tutorial, and so far everything worked, except when I tried running sc start defragsvc and got this error:

      [SC] StartService: OpenService FAILED 1060:
      The speficied service does not exist as an installed service.

      I tried googling on how to enable defragsvc in Server 2008 R2, but to no avail.

      Any help would be much appreciated =)

    • #51860

      Start > Administrative Tools > Services

      Navigate to Disk Defragmenter

      Double click to open it up.

      Set Startup type to Automatic

      Click Start

      Click on Apply, then OK, then close out.

      If this service does not start or does not exist something has corrupted Windows, i.e a virus accidental deletion and you will most likely need to reinstall Windows.

    • #51861

      I tried going to Services, but couldn’t find the Service “Disk Defragmenter”.

      My installation of Windows Server 2008 R2 is brand new, and I’m thinking could it be I didn’t install a specific Role, or Feature that would enable the Disk Defragmenter service?

      I could do a manual defragmentation using Start > Accessories > System Tools > Disk Defragmenter. But I couldn’t find that service..

      Any more ideas?

    • #51862

      @ethanweku wrote:

      I tried going to Services, but couldn’t find the Service “Disk Defragmenter”.

      My installation of Windows Server 2008 R2 is brand new, and I’m thinking could it be I didn’t install a specific Role, or Feature that would enable the Disk Defragmenter service?

      I could do a manual defragmentation using Start > Accessories > System Tools > Disk Defragmenter. But I couldn’t find that service..

      Any more ideas?

      A default installation of R2 has the Disk Defragmenter service with no roles or features installed. Are you sure that is Server 2008 R2 and not Server 2008? There’s a difference.

    • #44288

      Video Tutorial

      [youtube:11cadpqg]http://www.youtube.com/watch?v=LQJQT_kmbXA[/youtube:11cadpqg]
      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.

      You can download Superfetch via the R2 Conv GUI here: viewtopic.php?f=21&t=1460

      Thanks to ExpertUser for the upload.

      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:WindowsPrefetch. 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.

Viewing 14 reply threads
  • You must be logged in to reply to this topic.