Optimize Drives - Defrag HDD and TRIM SSD in Windows 8

How to Use "Optimize Drives" to Defrag HDD and TRIM SSD in Windows 8 and 8.1

information   Information
Optimize Drives, previously called Disk Defragmenter, helps to 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 runs automatically on a weekly schedule during the time you have set for automatic maintenance. You can also optimize drives on your PC manually any time you like.

This tutorial will show you how to open and use Optimize Drives or a command prompt to defrag hard disk drives and TRIM solid state drives in Windows 8, Windows RT, Windows 8.1, and Windows RT 8.1.

You must be signed in as an administrator to be able to do the steps in this tutorial.

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.





OPTION ONE

To Use "Optimize Drives" to Manually Defragment and Optimize Drives


1. In File Explorer, click/tap on Computer (Windows 8) or This PC (Windows 8.1), do step 1A or 1B below, then go to step 2 below.​
A) Select a HDD or SSD, click/tap on Manage (Drive Tools) tab, and click/tap on the Optimize button in the ribbon. (see screenshot below)​
Computer.jpg
B) Right click or press and hold on a HDD or SSD, click/tap on Properties, click/tap on Tools tab, Optimize button, and on OK. (see screenshot below)​
Properties.jpg
2. Under Status, click/tap on the drive you want to optimize. (see screenshot below)​
NOTE: The Media type column tells you what type (HDD or SSD) of drive you're optimizing.​
HDD.jpg
3. To determine if a HDD needs to be optimized, click/tap on Analyze. If prompted by UAC, then click/tap on Yes. (see screenshot below)​
NOTE: This is not available for a SSD.​
Analyze.jpg
4. Check the Current status column to see whether you need to optimize the drive (SSD or HDD). If the drive is more than 10% fragmented, then you should optimize the drive now.​
TRIM-2.jpg
5. To optimize the selected drive, click/tap on Optimize. If prompted by UAC, then click/tap on Yes. (see screenshot above and below)​
NOTE: 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.​
SSD.jpg
6. When finished, you can close the Optimize Drives window.​






OPTION TWO

To Use Command Prompt to Manually Defragment and Optimize Drives


1. Do step 2 or 3 below for how you would like to run the defrag command.​
2. To Use an Elevated Command Prompt in Windows 8
A) Open an elevated command prompt, and go to step 4 below.​
3. To Use 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: 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 8.​
D) In the command prompt, type exit and press Enter.​
E) Continue on to step 4 below.​
4. In the command prompt, type in the following command below followed by one or more switches (flags) that you would like to use below with a space between each switch and press Enter.​
Syntax:
defrag <volumes> | /C | /E <volumes> [<task(s)>] [/H] [/M | [/U] [/V]]​
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​
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.​
Parameters:
NOTE: Switches in red below are new to Windows 8.​

Switch (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).

/K

Perform slab consolidation on the specified volumes.

/L

Perform retrim on the specified volumes. Only for a SSD.

/M

Run the operation on each volume in parallel in the background.

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

CMD.jpg




That's it,
Shawn


 

Attachments

  • Configuration_File.png
    Configuration_File.png
    13.1 KB · Views: 402
Last edited by a moderator:
I usually set all my maintenance schedules to run when I know I'll be on the computer in the morning when I'm just doing my routine stuff before getting busy.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
That sounds like a plan :) I tend to leave mine on while having breakfast and that's when it always seems to run automatically. As soon as its left alone (no keys pressed, no cursor movement) is when it starts.

OK, so from all you've mentioned on this I think that it probably knows what its doing and so I'll sit it out for some time and see what develops. And thanks for the info on it all.
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender
You're most welcome. Please let us know how it goes. :)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Well I'm now over two weeks in and I relented and ran optimise manually as nothing was reported as having happened.

I don't really think there is a problem as such, but it is difficult to know just what is going on. Running optimise on all the partitions was completed in around 1 second for each. Does that sound right ? I could see a progress count of 'Trim 20%, 30%, 60% etc' but it really was all over in a second or so. The C drive was actually the quickest to do, the others that in reality see little change were the slowest, slowest being a relative term though.

I also observed a rather strange effect a few days ago that makes me think that the drive is doing 'something' on its own as regards maintenance, and it was this... I moved 6 files totalling around 120mb from a USB stick to my documents folder, and I found the free space on C had suddenly jumped up by around 0.7Gb

Capture1.JPG
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender
Hello Mooly, :)

SSDs today have a built-in garbage collection feature that helps keep them optimized, so it usually doesn't take long at all to TRIM a SSD in Windows.
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Thanks Shawn. I guess at the end of the day its all working fine despite Windows not doing what I would expect and updating the schedule.
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender
I just discovered that the built-in defrag does not work very well, whether I let it defrag on schedule or manually. Sometimes, the system still slows down, and does better only when I use a third-party defrag program, and do a boot defrag.

Interestingly enough, similar takes place even for HDs containing data. For example, I am currently using an SSD for the boot drive, so there are no more problems with a system slowdown, but I use an internal HD to burn large videos to DVDs. I routinely copy videos to the HD, burn them, delete them, then clear the recycle bin. At some point, verification errors begin to pop up after burning a DVD. It happens with the second and third disks, using disks from another tumbler, and other video files selected. It doesn't matter if I optimize the HD using the built-in Windows defrag and boot the system several times.

It's only when I defrag the HD using another program does the problem disappear.
 

My Computer

System One

  • OS
    Windows 8.1 64-bit
    Computer type
    PC/Desktop
    System Manufacturer/Model
    None
    CPU
    Intel Core i5-4690
    Motherboard
    MSI H97M-G43
    Memory
    8 GB 1866 MHz Kingston HyperX Fury Black
    Graphics Card(s)
    Inno3D N770 GTX770 2 GB DD5 256-bit
    Sound Card
    Realtek HD
    Monitor(s) Displays
    Samsung SyncMaster S23B300
    Screen Resolution
    1920 x 1080
    Hard Drives
    Intel SSD 250 GB
    Seagate 2 TB
    WD 2 TB
    WD Mybook 2 TB
    PSU
    Corsair HX750W
    Case
    Antec 900
    Cooling
    Intel Water Cooling
    Keyboard
    Logitech K120
    Mouse
    A4Tech X7
    Internet Speed
    50 GB
    Browser
    Cyberfox 64-bit
    Antivirus
    Avira Free
Back
Top