Page 1 of 9 123 ... LastLast
    Optimize and Defrag Drives in Windows 10

    Optimize and Defrag Drives in Windows 10

    How to Optimize and Defragment Drives in Windows 10

    Published by BrinkCategory: Performance & Maintenance
    25 Jul 2015 Last Updated: 25 Dec 2016 at 18:58

    Published by


    Brink's Avatar
    Administrator

    Posts: 24,502

    Show Printable Version 


    How to Optimize and Defragment Drives in Windows 10

    information   Information
    One of the best ways you can improve your PC's performance is by optimizing the drive. Windows includes features to help optimize the different types of drives that PCs use today. No matter which type of drive your PC uses, Windows automatically chooses the optimization that's right for your drive.

    By default, Optimize Drives, previously called Disk Defragmenter, runs automatically on a weekly schedule at the time set in automatic maintenance. But you can also optimize drives on your PC manually.

    This tutorial will show you how to manually optimize drives to defrag a HDD or TRIM a SSD in Windows 10.

    You must be signed in as an administrator to be able to optimize drives.

    Note   Note
    If the drive is being used by another program, or is formatted using a file system other than NTFS, FAT, or FAT32, it can't be optimized.

    Network drives can't be optimized.

    If a drive isn't appearing in Optimize Drives, it might be because it contains an error. Try to repair the drive with chkdsk first, then return to Optimize Drives to try again.


    CONTENTS:





    Optimize and Defrag Drives in Windows 10 OPTION ONE Optimize and Defrag Drives in Windows 10
    To Optimize Drives in Optimize Drives Tool

    1. Do step 2 or step 3 below for how you would like to open Optimize Drives.


     2. Optimize Drives from File Explorer Ribbon

    A) Open This PC in File Explorer.

    B) Select any hard drive, click/tap on the Drive Tools Manage tab, click/tap on Optimize button in the ribbon, and go to step 4 below. (see screenshot below)

    Click image for larger version. 

Name:	Optimize_drive-1.png 
Views:	1944 
Size:	66.5 KB 
ID:	25839


     3. Optimize Drives from Drive Properties

    A) Open This PC in File Explorer.

    B) Right click or press and hold on any hard drive, and click/tap on Properties. (see screenshot below)

    Click image for larger version. 

Name:	Optimize_drive-2a.png 
Views:	8280 
Size:	76.0 KB 
ID:	25840

    C) Click/tap on the Tools tab, click/tap on the Optimize button, and go to step 4 below. (see screenshot below)

    Name:  Optimize_drive-2b.png
Views: 184619
Size:  24.1 KB


    4. Select a drive you want or need to optimize, and click/tap on the Optimize button. (see screenshot below)
    Note   Note

    • You can select a drive and click/tap on the Analyze button to see if it needs to be optimized.
    • If the drive is more than 10% fragmented, then it should be optimized.
    • Optimizing a drive might take anywhere from several minutes to a few hours to finish, depending on the size of the drive and degree of optimization needed.
    • You can still use your PC during the optimization process.


    Name:  Optimize_drive-3.png
Views: 44967
Size:  25.1 KB







    Optimize and Defrag Drives in Windows 10 OPTION TWO Optimize and Defrag Drives in Windows 10
    To Optimize Drives in Command Prompt

    1. Do step 2 or step 3 below for how you would like to run the defrag command.


     2. To Run Defrag in Command Prompt in Windows 10

    A) Open an elevated command prompt, and go to step 4 below.


     3. To Run Defrag in Command Prompt at boot

    A) Open a command prompt at boot.

    B) In the command prompt, type diskpart, and press Enter.

    C) In the command prompt, type list volume, and press Enter.
    Note   Note
    Make note of the drive letter that you want to optimize. The drive letter for the drive will not always be the same at boot as it is in Windows.


    D) In the command prompt, type exit, press Enter, and go to step 4 below.

    4. In the command prompt, type the command you want to use below, and press Enter.

    Commonly Used Commands:

    defrag C: /O
    NOTE: Substitute C: in the command with the drive letter you want instead.

    defrag /C /O
    NOTE: For all HDDs and SSDs.


    Syntax:

    defrag <volumes> | /C | /E <volumes> [<task(s)>] [/H] [/M [n] | [/U] [/V]] [/I n]

    Where <task(s)> is omitted (traditional defrag), or as follows: /A | [/D] [/K] [/L] | /O | /X

    Or, to track an operation already in progress on a volume: defrag <volume> /T

    Parameters:

    Value Description
    /A Perform analysis on the specified volumes.
    /B Perform boot optimization to defrags the boot sector of the boot volume. This will not work on a SSD.
    /C Perform the operation on all volumes.
    /D Perform traditional defrag (this is the default).
    /E Perform the operation on all volumes except those specified.
    /H Run the operation at normal priority (default is low).
    /I n Tier optimization would run for at most n seconds on each volume.
    /K Perform slab consolidation on the specified volumes.
    /L Perform retrim on the specified volumes. Only for a SSD.
    /M [n] Run the operation on each volume in parallel in the background. At most n threads optimize the storage tiers in parallel.
    /O Perform the proper optimization for each media type.
    /T Track an operation already in progress on the specified volume.
    /U Print the progress of the operation on the screen.
    /V Print verbose output containing the fragmentation statistics.
    /X Perform free space consolidation on the specified volumes.

    Click image for larger version. 

Name:	defrag_command_parameters.png 
Views:	1572 
Size:	85.6 KB 
ID:	25838






    Optimize and Defrag Drives in Windows 10 OPTION THREE Optimize and Defrag Drives in Windows 10
    To Optimize Drives in PowerShell

    Note   Note
    For more Optimize-Volume command usage options, see: Optimize-Volume


    1. Open an elevated PowerShell.

    2. Do step 3 (analyze), step 4 (optimize), step 5 (TRIM), step 6 (defrag) below for what command you want to use.


     3. To Analyze Current Optimization of Drive

    A) Type the command below into PowerShell, press Enter, and go to step 7 below.

    Optimize-Volume -DriveLetter <drive letter> -Analyze –Verbose

    Note   Note
    Analyzes the volume specified for fragmentation statistics. Performs analysis only and reports the current optimization state of the volume.

    Substitute <drive letter> in the command above with the actual drive letter you want to analyze.

    For example: Optimize-Volume -DriveLetter C -Analyze -Verbose


    Click image for larger version. 

Name:	optimize-volume-Analyze.png 
Views:	798 
Size:	100.4 KB 
ID:	62861


     4. To Automatically TRIM or Defrag Drive for what is Proper

    A) Type the command below into PowerShell, press Enter, and go to step 7 below.

    Optimize-Volume -DriveLetter <drive letter> -Verbose

    Note   Note
    Automatically performs the proper optimization (TRIM or defrag) for the drive.

    Substitute <drive letter> in the command above with the actual drive letter you want to optimize.

    For example: Optimize-Volume -DriveLetter C -Verbose


    Click image for larger version. 

Name:	optimize-volume.png 
Views:	543 
Size:	45.4 KB 
ID:	62862


     5. To TRIM a SSD (Solid State Drive)

    warning   Warning
    Do not use this command on a hard drive (spinner).


    A) Type the command below into PowerShell, press Enter, and go to step 7 below.

    Optimize-Volume -DriveLetter <drive letter> -ReTrim -Verbose

    Note   Note
    Generates TRIM and Unmap hints for all currently unused sectors of the volume, notifying the underlying storage that the sectors are no longer needed and can be purged. This can recover unused capacity on thinly provisioned drives.

    Substitute <drive letter> in the command above with the actual drive letter of the SSD you want to TRIM.

    For example: Optimize-Volume -DriveLetter C -ReTrim -Verbose


    Click image for larger version. 

Name:	optimize-volume-ReTrim.png 
Views:	876 
Size:	48.2 KB 
ID:	62863


     6. To Defrag a Hard Drive

    warning   Warning
    Do not use this command on a solid state drive (SSD).


    A) Type the command below into PowerShell, press Enter, and go to step 7 below.

    Optimize-Volume -DriveLetter <drive letter> -Defrag -Verbose

    Note   Note
    Indicates that the cmdlet initiates defragmentation on the specified volume. Defragmentation consolidates fragmented regions of files to improve performance of sequential reads or writes.

    Substitute <drive letter> in the command above with the actual drive letter of the hard drive you want to defrag.

    For example: Optimize-Volume -DriveLetter C -Defrag -Verbose


    Click image for larger version. 

Name:	optimize-volume-Defrag.jpg 
Views:	1323 
Size:	992.0 KB 
ID:	62864


    7. When finished, you can close PowerShell if you like.



    That's it,
    Shawn


  1.    25 Jul 2015 #1
    Join Date : Jun 2015
    Posts : 534
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    Very nice tutorial, thank you, I've just optimized both of my SSDs. What about the System Reserved volumes? They do appear in the menu but nothing happens. Can those be optimized, as well, and is it required?

    Thank you.
      My ComputerSystem Spec
  2.    25 Jul 2015 #2
    Join Date : Oct 2013
    Posts : 24,502
    64-bit Windows 10 Pro build 17017
    Thread Starter

    Hello Joanne,

    You could optimize the System Reserved volumes, but usually they don't need it since nothing is saved or deleted from them once created during installation.
      My ComputersSystem Spec
  3.    25 Jul 2015 #3
    Join Date : Jun 2015
    Posts : 534
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    All right, thank you Brink

    I would like to ask you to make a tutorial on something. I peg your pardon but I have not found the appropriate thread to place this request. Anyway, have you made or can you make a Tutorial on how can the average user benefit the most from the usage of the Event Viewer?

    For example, how can I see which program requires the most time on Start up or the total time of start up itself?
    If something like this already exists please provide a link.

    Thank you!!
      My ComputerSystem Spec
  4.    25 Jul 2015 #4
    Join Date : Oct 2013
    Posts : 24,502
    64-bit Windows 10 Pro build 17017
    Thread Starter

    That would be a broad topic. For now, you could look under E for Event Viewer in the tutorial indexes below for some options to help.

    Windows 7 - Tutorial Index - Page 2 - Windows 7 Help Forums

    Windows 8 - Tutorial Index
      My ComputersSystem Spec
  5.    25 Jul 2015 #5
    Join Date : Jun 2015
    Posts : 534
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon

    AWESOME!! Thank you!!
      My ComputerSystem Spec
  6.    25 Jul 2015 #6

    I've always found it odd that when you type "defrag" in the search, the one that has the defrag icon isnt the actual exe file. The exe file doen't have an icon.

    Computer newbies would be confused by that.
      My ComputersSystem Spec
  7.    28 Jul 2015 #7
    Join Date : Jul 2015
    Posts : 1
    Windows 10 Preview

    Is SSD optimization needed? There should be internal trash collection done by the drive itself, right?
      My ComputerSystem Spec
  8.    28 Jul 2015 #8
    Join Date : Oct 2013
    Posts : 24,502
    64-bit Windows 10 Pro build 17017
    Thread Starter

    Hello Silentheero, and welcome to Ten Forums.

    While TRIM is not required for today's SSDs, it does help garbage collection, and extend the life of the SSD. Here's a good article I found that explains this very well.

    Ask Ars: "My SSD does garbage collection, so I don't need TRIM... right?"¯ | Ars Technica
      My ComputersSystem Spec
  9.    23 Nov 2015 #9
    Join Date : Oct 2015
    Posts : 21
    Windows 10

    Hi guys,

    A quick question; on my own PC (running Windows 10) I can select to 'optimize' my SSD (which will trim it most probably).
    However on my mother's PC (also running Windows 10) the SSD is not being shown, only her harddisk (which is being used for backups and pictures)?

    Is there a Windows registry setting which I can change, so I can also select the SSD in Windows defrag program, so I can 'optimize' the SSD as well?

    Thank you.
      My ComputerSystem Spec

 
Page 1 of 9 123 ... LastLast


Similar Threads
Tutorial Category
Performance & Maintenance Change Optimize Drives Schedule Settings in Windows 10
How to Change Schedule Settings for Optimize Drives in Windows 10 One of the best ways you can improve your PC's performance is by optimizing the drive. Windows includes features to help optimize the different types of drives that PCs use today....
Tutorials
Solved Location of disk defrag/optomize in Windows 10
In Windows 10 I can find disk optimize by using the search engine in settings, and typing in: "Disk defrag and optimize". Or by right clicking the drive in question > Properties > Tools tab. But it doesn't show the folder location. I've...
General Support
windows dosent defrag drives raided with Mssd
not only in windows 10 but in all windows i always thought that windows was automatically defragging my hard drives and then i turn around and just decided to check with a 3rd party defrag (because my pc boots slow) and theres 65gb of fragmented...
Software and Apps
Windows 10 TP Hiding Hard Drives?
Anyone having trouble with Build 10041 hiding Drives? 1552115522
Drivers and Hardware
O&O Defrag
I downloade & installed the trial version of O&O Defragmenter tool. I started a defrag last night at midnight setting it to do a 'Complete/Modfied' which I read is the best drag which will give you a faster boot time (which is what i want). it has...
Software and Apps
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:12.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums