Fix "Optimization Not Available" in Optimize Drives in Windows - gHacks Tech News

ADVERTISEMENT

Fix "Optimization Not Available" in Optimize Drives in Windows

Microsoft's Windows operating system runs maintenance tasks including disk analysis and defragmention regularly on its own.

Most Windows users and administrators don't need to run these manually anymore, but there are cases where you'd like to do so.

I checked Optimize Drives recently and discovered that Windows refused to run on two of the hard drives. Windows displayed "Optimization not available" as the status, "unknown" as the media type, and "never run" as the last run date and time.

You can access the Optimize Drives tool by right-clicking on a drive in Explorer, selecting Properties from the context menu, and opening Tools > Optimize.

optimization not available

The analyze and optimize buttons could not be used in the window as they were not active. My first assumption was that this might have something to do with encryption, as both volumes were encrypted and only mounted when I needed to access data on them.

Two solutions came to my mind: try the command line version of defrag to see if it would work, or use third-party defragmentation software like Smart Defrag, Vopt, Defraggler or Live Defrag. I decided to try the command line tool defrag first as it is a first-party solution.

Fixing the "Optimization not available" issue

defrag optimize drives

You need to launch an elevated command prompt to get started. If you are on Windows 10, use the shortcut Windows-X to display the "hidden" menu and select Command Prompt (Admin). You may also open Start on any version of Windows, type cmd.exe, right-click on the result, and select run as administrator to launch an elevated command prompt window.

The core command is defrag and you may want to start running defrag /? to display all command options. Microsoft has a handy reference on the company's Docs website that explains each of the parameters and gives some examples.

You may want to run an analysis first. The analysis returns the fragmentation status of the drive and gives a recommendation.

defrag p: /A

The command analysis the fragmentation status of the drive P on the device. You need to change the drive letter if it is not drive P that you want to analyze. The command defrag c: /A would analyze the C drive instead.

You may defragment the drive if the drive is fragmented, e.g. when Windows recommends that you should defragment the drive.

defrag p: /U /V

The command runs the defragmentation operation on drive P. The parameters U and V echo progress and information on the screen while the operation takes place.

You will notice that defrag runs fine on the drives even though Windows' "Optimize Drives" tool refused to run these operations.

Tip: If you want to defrag SSDs, use the parameters /L and /O as well. It instructs defrag to run a trim command after the operation completes and to run the proper optimization for the media type.

Other parameters of interest are:

  • E -- To perform the operation on all drives except those that you specify.
  • C -- To perform the defrag operation on all drives.
  • X -- To consolidate free disk space on the volumes you specify.

Closing Words

If Windows refuses to run defragmentation operations on a drive in "Optimize Drives", use the command line version of defrag instead to run the commands.

Summary
Fix "Optimization Not Available" in Optimize Drives in Windows
Article Name
Fix "Optimization Not Available" in Optimize Drives in Windows
Description
Find out what you can do if the Windows "Optimize Drives" tool blocks defragmentation operations on selected hard drives.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: »

Comments

  1. John Doe 101 said on April 1, 2019 at 12:47 pm
    Reply

    Simply use Defraggler from Piriform, always works like charm. ^^

  2. anon said on April 1, 2019 at 1:37 pm
    Reply

    This isn’t the solution. “Optimization not available” refers to an hardware configuration issue. Make sure the drive is connected to the correct port and port type, check the BIOS or UEFI, and update the storage device drivers if necessary.

    1. Yuliya said on April 1, 2019 at 3:46 pm
      Reply

      Sometimes Windows simply doesn’t know what to do with the drive. I encountered this problem once, on the same hardware with no changes to the system, not even in BIOS, within a few hours:
      Windows 7 – defrag would defragment the system drive, an SSD
      Windows 8.1 – defrag would fail, telling me optimisation was not available for that drive
      Windows 1607 LTSB – defrag would retrim the same SSD
      All operating systems were up to date and configured in the same way (trim enabled, WinSAT ran, same driver versions, etc..).

  3. ilev said on April 1, 2019 at 5:14 pm
    Reply

    Another Microsoft’s baked “Utility” that isn’t worth the disk space and CPU it uses.
    Just check the latest status of my Windows 10 Optimize Drives :
    I have 3 drives : C – SSD, D – 1TB HDD Internal, G – 3TB USB External.

    Optimize Drives run on C drive on Mar. 15 (17 days ago)
    Optimize Drives run on D drive on Mar. 29 (status OK, 0 fragmented)
    Optimize Drives run on G drive on Mar. 29 (status OK, 0 fragmented).

    My laptop in on 24/7 and G drive is in usage read/write 24/7 and is very much fragmented (11%).

    Just use 3rd party defrag app once in a while.

  4. Sebas said on April 1, 2019 at 8:37 pm
    Reply

    Excellent. My brand new desktop with Windows 10 sees my conventional harddisk as a SSD and refuses to defrag. When googling you see occur this problem sometimes. This is just what I need.

    One caveat: you must write your drive letter in capital. So it is C, not c.

    1. Martin Brinkmann said on April 1, 2019 at 9:04 pm
      Reply

      Hm, lower case drive letters work just fine on my W10 test machine.

    2. Yuliya said on April 1, 2019 at 9:21 pm
      Reply

      Sebas, you can go to Device manager > Disk drives and uninstall the driver for that drive. Restart your computer and now Windows should reinstall its driver. Whoever configured that PC probably used an image they created for a PC with a SSD and Windows decided not to adjust it to the newly discovered hardware.

      1. Sebas said on April 2, 2019 at 8:12 am
        Reply

        Thanks Yulia, appreciated. I will do that, when googling someone already mentioned to reinstall the driver.

      2. Sebas said on April 3, 2019 at 1:46 pm
        Reply

        Yulia I reinstalled the drive, but to no avail. So for the time being I will use this solution.

      3. Yuliya said on April 3, 2019 at 8:29 pm
        Reply

        Make sure you don’t have any device showing a warning sign (it will show up in Device manager under a separate category, expanded by default), mainly the chipset driver. Other than that I don’t know.. well, other than Windows being Windows I guess. I encountered this once (stated above) and could not figure it out myself either.

  5. stefann said on April 2, 2019 at 12:29 am
    Reply

    If You use a Samsung SSD You just have to use Samsung Magician’s ‘advanced optimization’ once: when installation of Windows + install of updates and other softwares are installed. A SSD doesn’t get fragmented as a mechanical drive.

    My computer with XP x64 and 7 x64 in dual boot is as fast today as it was three years ago (here i mean XP x64 – 7 x64 was re-installed earlier this year – i don’t let them see each other, therefor the optimization in Windows 7 didn’t affect the XP x64 partition).

    I use a third party SSD tool (SSD Tool 0.9.5 works in XP/XP x64) once a month to get rid of left clutter from deleted files.

    As i once stated some Windows services/tools that are used on mechanical drives should never be used on a SSD (even if todays SSD’s are better than they once were, each cell on a SSD still has a limited life). Heavy writings, saves and temp-files are on an external mechanical drive (USB 3.0) in my system. Hopefully this will make the SSD live longer than the computer itself.

  6. Randy said on April 2, 2019 at 6:19 pm
    Reply

    Are you using Vera Crypt?
    Did not work for SSD in VeraCrypt container. The regular defrag will work (as if it was a non-SSD, which is bad), but commands /L and /O won’t do anything.

  7. Rick A. said on April 10, 2019 at 3:38 pm
    Reply

    There was a glitch where Windows 10 would think you have an SSD when you actually have a Hard Drive or would think you have a Hard Drive when you actually have an SSD. This happened a lot when upgrading from Windows whatever to Windows 10.

    This issue is probably in the same glitch neighborhood…..

  8. Luan said on August 8, 2019 at 4:26 am
    Reply

    That fixed the issue! THanks!

  9. Mauricio JP said on September 5, 2019 at 11:18 pm
    Reply

    There is a bug between W10 and Driver
    Several years ago I found this:
    “Microsoft Drive Optimizer mistakenly lists SATA hard disk drive as SSD and will not defragment the drive
    I found a fix to the mistaken SSD issue:
    Windows relies on a registry value as an indicator that the drive is a normal hard drive or an SSD.
    In Regedit, have a look at the key of:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinSAT
    The Defragmenter will think the device is a SSD when the value is of RandomReadDiskScore is above a specific value.

    Running “CMD” the Command line of “winsat formal” will recalculate the value for the drive and in my case, the new value became RandomReadDiskScore = hex 65c (1628).
    The Defragmenter now runs on the drive which is no longer identified as an SSD !
    Dave”

    Be patient and wait to run the command. It doesn’t take long.
    Conflict solved.

  10. Vasudev said on October 27, 2019 at 11:19 am
    Reply

    If anyone still gets Optimisation not available after an OS upgrade or driver update. Try this:

    1. Open regedit
    2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\Statistics
    3. Delete all subkeys under Statistics
    4. Reboot your PC and open defrag GUI and you’ll see Optimize/Optimise button.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.