Jump to content

Windows SSD optimization (defrag)

Kyzer

I understand that Windows uses a TRIM function to move randomly placed data into neater blocks on the SSD, which groups information together instead of having it on random memory chips across the drive. I was wondering if it does this with Windows Defrag/Optimize or if Windows Defrag/Optimize does it the HDD way. I'd like to assume that Windows can detect it's an SSD and won't do a wrong defrag, but I'm not sure. I like to run daily defrags since I'm downloading a game now and then.

But first, let's talk about parallel universes.

Spoiler

Intel i7-4790k undervolt, NVidia EVGA GTX 980Ti SC Reference, NVidia EVGA GTX 480 SC Reference, ASUS Z97-A/USB3.1, SK Hynix SL308 240GB, WD Green 2TB, Hynix 1333 8GB (4x2), XFX Core Pro 850w, NH-U12S, 4x NF-F12's, Sennheiser HD 558's, Blue Yeti, Corsair K70 (red), Logitech MX Master, XBox One Controller, ASUS VG248QE 144Hz, HP 2010i

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Kyzer said:

I understand that Windows uses a TRIM function to move randomly placed data into neater blocks on the SSD, which groups information together instead of having it on random memory chips across the drive. I was wondering if it does this with Windows Defrag/Optimize or if Windows Defrag/Optimize does it the HDD way. I'd like to assume that Windows can detect it's an SSD and won't do a wrong defrag, but I'm not sure. I like to run daily defrags since I'm downloading a game now and then.

Windows Defrag can detect HDD's and SSD's but uses only the "defragment" as the selected option although in reality the trim function is used.

Cor Caeruleus Reborn v6

Spoiler

CPU: Intel - Core i7-8700K

CPU Cooler: be quiet! - PURE ROCK 
Thermal Compound: Arctic Silver - 5 High-Density Polysynthetic Silver 3.5g Thermal Paste 
Motherboard: ASRock Z370 Extreme4
Memory: G.Skill TridentZ RGB 2x8GB 3200/14
Storage: Samsung - 850 EVO-Series 500GB 2.5" Solid State Drive 
Storage: Samsung - 960 EVO 500GB M.2-2280 Solid State Drive
Storage: Western Digital - Blue 2TB 3.5" 5400RPM Internal Hard Drive
Storage: Western Digital - BLACK SERIES 3TB 3.5" 7200RPM Internal Hard Drive
Video Card: EVGA - 970 SSC ACX (1080 is in RMA)
Case: Fractal Design - Define R5 w/Window (Black) ATX Mid Tower Case
Power Supply: EVGA - SuperNOVA P2 750W with CableMod blue/black Pro Series
Optical Drive: LG - WH16NS40 Blu-Ray/DVD/CD Writer 
Operating System: Microsoft - Windows 10 Pro OEM 64-bit and Linux Mint Serena
Keyboard: Logitech - G910 Orion Spectrum RGB Wired Gaming Keyboard
Mouse: Logitech - G502 Wired Optical Mouse
Headphones: Logitech - G430 7.1 Channel  Headset
Speakers: Logitech - Z506 155W 5.1ch Speakers

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, ARikozuM said:

Windows Defrag can detect HDD's and SSD's but uses only the "defragment" as the selected option although in reality the trim function is used.

So Windows won't do a 'dumb' defrag? Great.

But first, let's talk about parallel universes.

Spoiler

Intel i7-4790k undervolt, NVidia EVGA GTX 980Ti SC Reference, NVidia EVGA GTX 480 SC Reference, ASUS Z97-A/USB3.1, SK Hynix SL308 240GB, WD Green 2TB, Hynix 1333 8GB (4x2), XFX Core Pro 850w, NH-U12S, 4x NF-F12's, Sennheiser HD 558's, Blue Yeti, Corsair K70 (red), Logitech MX Master, XBox One Controller, ASUS VG248QE 144Hz, HP 2010i

 

Link to comment
Share on other sites

Link to post
Share on other sites

Not 100% sure but I think the optimise command sends a TRIM signal to the SSD for current free areas. It is up to the drive to sort out what goes where, and when. Windows doesn't and can't force that.

Main system: i9-7980XE, Asus X299 TUF mark 2, Noctua D15, Corsair Vengeance Pro 3200 3x 16GB 2R, RTX 3070, NZXT E850, GameMax Abyss, Samsung 980 Pro 2TB, Acer Predator XB241YU 24" 1440p 144Hz G-Sync + HP LP2475w 24" 1200p 60Hz wide gamut
Gaming laptop: Lenovo Legion 5, 5800H, RTX 3070, Kingston DDR4 3200C22 2x16GB 2Rx8, Kingston Fury Renegade 1TB + Crucial P1 1TB SSD, 165 Hz IPS 1080p G-Sync Compatible

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, porina said:

Not 100% sure but I think the optimise command sends a TRIM signal to the SSD for current free areas. It is up to the drive to sort out what goes where, and when. Windows doesn't and can't force that.

Correct. The SSD's controller will control where the data goes and where to retrieve it.

 

1 minute ago, Kyzer said:

So Windows won't do a 'dumb' defrag? Great.

Data for SSD's is usually evenly split between the modules so that as many parallel IOPS can be achieved.

Cor Caeruleus Reborn v6

Spoiler

CPU: Intel - Core i7-8700K

CPU Cooler: be quiet! - PURE ROCK 
Thermal Compound: Arctic Silver - 5 High-Density Polysynthetic Silver 3.5g Thermal Paste 
Motherboard: ASRock Z370 Extreme4
Memory: G.Skill TridentZ RGB 2x8GB 3200/14
Storage: Samsung - 850 EVO-Series 500GB 2.5" Solid State Drive 
Storage: Samsung - 960 EVO 500GB M.2-2280 Solid State Drive
Storage: Western Digital - Blue 2TB 3.5" 5400RPM Internal Hard Drive
Storage: Western Digital - BLACK SERIES 3TB 3.5" 7200RPM Internal Hard Drive
Video Card: EVGA - 970 SSC ACX (1080 is in RMA)
Case: Fractal Design - Define R5 w/Window (Black) ATX Mid Tower Case
Power Supply: EVGA - SuperNOVA P2 750W with CableMod blue/black Pro Series
Optical Drive: LG - WH16NS40 Blu-Ray/DVD/CD Writer 
Operating System: Microsoft - Windows 10 Pro OEM 64-bit and Linux Mint Serena
Keyboard: Logitech - G910 Orion Spectrum RGB Wired Gaming Keyboard
Mouse: Logitech - G502 Wired Optical Mouse
Headphones: Logitech - G430 7.1 Channel  Headset
Speakers: Logitech - Z506 155W 5.1ch Speakers

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Kyzer said:

So Windows won't do a 'dumb' defrag? Great.

it is great since normal defragging is pointless on an ssd since they can access all the blocks at once and the only thing that does is reduce endurance. as long as windows recognizes that a drive is an ssd, the optimize function runs trim. the way ssds work is that when you delete something, it only deletes the header that points to the file, but not the actual data. when you overwrite that block with new data, it has to wait and delete the old unneeded data first, slowing down the drive. trim just goes by and preemptively deletes all these blocks so that when you use them, the ssd stays fast

Altair - Firestrike: http://www.3dmark.com/3dm/13945459

CPU:  i7-4790 @ 3.6 GHz Motherboard: Gigabyte B85M-DS3H-A RAM: 16GB @ 1600MHz CL11 GPU: XFX RX 470 RS Storage: ADATA SP550 240GB | WD Blue 1TB | Toshiba 2TB PSU: EVGA B2 750W Case: Phanteks Enthoo Pro Fans: Phanteks PH-F200SP (Front) | Phanteks PH-F140SP (Rear) | Noctua NF-A15 (Top)

Mouse: Logitech G502 | Keyboard: Corsair K70 MX Brown | Audio: Sennheiser HD 558

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, Kyzer said:

So Windows won't do a 'dumb' defrag? Great.

Windows is not moving data around when running the TRIM command by itself. The TRIM command only tells the SSD to erase any blocks marked as "free." TRIM is not a defragging function.

Edited by Godlygamer23

"It pays to keep an open mind, but not so open your brain falls out." - Carl Sagan.

"I can explain it to you, but I can't understand it for you" - Edward I. Koch

Link to comment
Share on other sites

Link to post
Share on other sites

14 minutes ago, Kyzer said:

I understand that Windows uses a TRIM function to move randomly placed data into neater blocks on the SSD, which groups information together instead of having it on random memory chips across the drive. I was wondering if it does this with Windows Defrag/Optimize or if Windows Defrag/Optimize does it the HDD way. I'd like to assume that Windows can detect it's an SSD and won't do a wrong defrag, but I'm not sure. I like to run daily defrags since I'm downloading a game now and then.

Let me give a few pointers.

  • TRIM is a housekeeping function for when stuff gets deleted. It doesn't "defrag" SSDs
  • There's no point in moving random data logically closer together on an SSD because flash memory can give you data at any address without much of a penalty. Hard drives have to wait until the head gets to the location before data is picked up.
  • Defragging involves erasing and rewriting data. This is something you do not want to do on an SSD because you'll be eating into your PE cycles like crazy.
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×