How to Defrag and Optimize SSD on Windows 11 the Right Way

Defragmenting an SSD shortens its lifespan without improving performance. But SSDs still need maintenance — just different maintenance than HDDs. Here's what actually helps and what to avoid.
SSD vs HDD: Why They Need Different Treatment
HDDs store data on magnetic platters with a mechanical read head. Fragmented files (data scattered across different physical locations) slow HDDs because the head has to physically move to read them. Defragmentation reorganizes files so they're sequential.
SSDs have no moving parts. Data access time is the same regardless of where data is physically stored on the chips. Defragmentation doesn't improve speed, but the write operations required to reorganize data do consume write cycles — and SSDs have a finite number of write cycles before they degrade. For the broader storage and system optimization picture, see the PC optimization checklist for a new Windows PC.
Rule one: Never run traditional defragmentation on an SSD.
TRIM: The SSD's Equivalent of Defragmentation
TRIM tells the SSD which data blocks are no longer in use so the drive can clear them in advance. Without TRIM, the SSD has to perform a read-modify-write cycle every time it writes to a "used" block, which slows write speeds significantly as the drive fills up.
Windows 11 enables TRIM automatically, but it's worth verifying:
- Open Command Prompt as Administrator
- Run:
fsutil behavior query DisableDeleteNotify - If the output shows
DisableDeleteNotify = 0, TRIM is enabled (correct) - If output shows
DisableDeleteNotify = 1, enable it:fsutil behavior set DisableDeleteNotify 0
TRIM runs automatically through Windows' scheduled optimization task. You don't need to run it manually.
Scheduled Drive Optimization (The Right Setting)
Windows 11 has a built-in "Optimize Drives" scheduler. For SSDs, this runs TRIM (retrim) on schedule, not defragmentation.
- Open Defragment and Optimize Drives (search in Start)
- Select your SSD
- Click Change settings
- Set Frequency: Weekly — daily is unnecessary and adds some write overhead; never is too infrequent
You should see "Optimize" listed as the scheduled task type for SSDs, not "Defragment". If it shows "Defragment" for your SSD, Windows isn't correctly identifying it as a solid-state drive. Check Device Manager → Disk drives to confirm your drive is detected properly.
StorAHCI vs AHCI Driver
Windows includes two SATA drivers: the generic Microsoft StorAHCI driver and the manufacturer's AHCI controller driver (often from Intel or AMD via their chipset software). For most users, StorAHCI is fine and has fewer compatibility issues.
Check which you're running:
- Device Manager → IDE ATA/ATAPI controllers or Storage controllers
- If you see "Standard SATA AHCI Controller", you're on Microsoft's driver
NVMe users: The Microsoft NVMe driver (stornvme.sys) is generally excellent for Windows 11. Manufacturer-specific NVMe drivers (Samsung NVMe Driver, etc.) sometimes improve sequential read speeds by 5–10% but are rarely necessary for gaming.
NVMe-Specific Tweaks
For M.2 NVMe drives, two additional settings are worth checking:
Link Power Management (ASPM): Some NVMe drives enter a low-power state between accesses, causing tiny latency spikes when waking up. To disable:
- Open Device Manager → Disk Drives → right-click your NVMe → Properties → Details
- Check if power management is enabled
- Uncheck "Allow the computer to turn off this device to save power" if visible
Host Memory Buffer (HMB): Entry-level NVMe drives without DRAM cache use a portion of your system RAM as a cache (HMB). This is enabled by default and beneficial — don't disable it.
Write Cache: Ensure write cache is enabled for your SSD: Device Manager → Disk Drives → right-click → Properties → Policies → Enable write caching on the device (check the box). This improves write performance by using a RAM buffer for writes.
Free Space: The Hidden Performance Factor
SSDs slow down as they fill up, especially below 15% free space. This is due to reduced room for garbage collection and wear leveling algorithms.
For optimal performance:
- Keep at least 15–20% of the drive free at all times
- On a 500GB drive: keep at least 75–100GB free
- On a 1TB drive: keep at least 150–200GB free
This is more impactful than any driver tweak. A drive at 95% capacity can be 30–40% slower on sustained writes than the same drive at 70%.
SSD Health Monitoring
Monitor your SSD's health with CrystalDiskInfo (free). It reads S.M.A.R.T. data and displays:
- Overall health status (Good/Caution/Bad)
- Total bytes written (TBW) compared to the drive's rated endurance
- Temperature (SSDs should run below 70°C under load; NVMe drives can run hotter — check your drive's spec)
- Reallocated sectors (any non-zero value here is a warning sign)
Check CrystalDiskInfo every few months. If it shows "Caution", back up your data and plan to replace the drive within the next few months.
What Not to Do
Don't defrag SSDs: Already covered, but worth repeating — some third-party "optimizer" tools still run defragmentation on SSDs. Avoid any tool that defragments your SSD.
Don't disable the pagefile: Some guides recommend disabling the pagefile to reduce SSD writes. This can cause crashes when RAM is under pressure. Keep the pagefile enabled — the write volume from pagefile use is negligible on modern SSDs rated for 200–600 TBW.
Don't trust "SSD optimization" tools from sketchy sources: Several popular "optimizer" tools include bundled software installers. Windows 11's built-in optimizer handles everything you actually need.
For a complete Windows optimization approach that covers SSD, RAM, GPU, and gaming settings in one workflow, SageTweaks handles storage optimization alongside the full gaming performance stack. Pairing SSD optimization with proper RAM configuration for gaming gives you the best possible storage and memory throughput for games.

PC performance enthusiast and Windows optimization specialist with 10+ years tuning gaming rigs. Contributor to SageTweaks.
More from Alex →SageTweaks
Ready to review guided PC optimization?
Use SageTweaks to review FPS, input latency, and Windows overhead workflows. Guided optimization for Windows 10 & 11.
- Guided GPU, CPU & power plan workflows
- Dedicated and detected-game FPS profiles
- Registry cleaner & startup manager
- Monthly, Yearly & Lifetime plans
30-day money-back guarantee
Next steps
Free PC optimization checklist
The 47-tweak manual version — yours to keep.
Free per-game FPS cheat sheets
Printable settings for Valorant, CS2, Fortnite, Apex.
See every SageTweaks feature
System tweaks, game profiles, cleaner, registry, power plans.
How we keep your PC safe
VirusTotal report published, rollback support, clear network use.
Read user reviews
Read public feedback and product notes before you buy.
Compare plans
Monthly $5.99 · Yearly $49.99 · Lifetime $79.99.
Related Posts
How to Remove Copilot from Windows 11 (Permanent Fix 2026)
Remove Copilot from Windows 11 for good. 4 methods (Settings, Group Policy, registry, debloat) — including how to stop it returning after updates.
How to Skip the Microsoft Account on Windows 11 (2026 Methods)
Skip the Microsoft account requirement during Windows 11 setup. 4 methods — Rufus, OOBE bypass, command line, network skip — for Home and Pro editions.
Windows 11 24H2 Debloat Guide — What to Remove, What to Leave Alone
Debloat Windows 11 24H2 the safe way. What's new to remove (Copilot+, Recall), what's risky to touch, and the right tool for each level of cleanup.
