Jump to content

Whats wrong with defragging an SSD?

Guest

I've never used an SSD before -but I plan to. In an off-topic thread about stupidest tech mistakes, a few people said the stupidest thing they'd ever done with computers is defrag an SSD. What's wrong with defragging? I don't know much about SSDs so would someone please explain?

Link to comment
Share on other sites

Link to post
Share on other sites

An SSD's life is determined by write cycles that you waste when you defrag.

Case: Corsair 4000D Airflow; Motherboard: MSI ZZ490 Gaming Edge; CPU: i7 10700K @ 5.1GHz; Cooler: Noctua NHD15S Chromax; RAM: Corsair LPX DDR4 32GB 3200MHz; Graphics Card: Asus RTX 3080 TUF; Power: EVGA SuperNova 750G2; Storage: 2 x Seagate Barracuda 1TB; Crucial M500 240GB & MX100 512GB; Keyboard: Logitech G710+; Mouse: Logitech G502; Headphones / Amp: HiFiMan Sundara Mayflower Objective 2; Monitor: Asus VG27AQ

Link to comment
Share on other sites

Link to post
Share on other sites

Reduces the lifespan of the NAND chips by doing a ton of write cycles.

Main rig on profile

VAULT - File Server

Spoiler

Intel Core i5 11400 w/ Shadow Rock LP, 2x16GB SP GAMING 3200MHz CL16, ASUS PRIME Z590-A, 2x LSI 9211-8i, Fractal Define 7, 256GB Team MP33, 3x 6TB WD Red Pro (general storage), 3x 1TB Seagate Barracuda (dumping ground), 3x 8TB WD White-Label (Plex) (all 3 arrays in their respective Windows Parity storage spaces), Corsair RM750x, Windows 11 Education

Sleeper HP Pavilion A6137C

Spoiler

Intel Core i7 6700K @ 4.4GHz, 4x8GB G.SKILL Ares 1800MHz CL10, ASUS Z170M-E D3, 128GB Team MP33, 1TB Seagate Barracuda, 320GB Samsung Spinpoint (for video capture), MSI GTX 970 100ME, EVGA 650G1, Windows 10 Pro

Mac Mini (Late 2020)

Spoiler

Apple M1, 8GB RAM, 256GB, macOS Sonoma

Consoles: Softmodded 1.4 Xbox w/ 500GB HDD, Xbox 360 Elite 120GB Falcon, XB1X w/2TB MX500, Xbox Series X, PS1 1001, PS2 Slim 70000 w/ FreeMcBoot, PS4 Pro 7015B 1TB (retired), PS5 Digital, Nintendo Switch OLED, Nintendo Wii RVL-001 (black)

Link to comment
Share on other sites

Link to post
Share on other sites

no benefit as SSD's don't really have seek time (the time it takes for the write head to find all parts of the file, so if its fragmented you can see why it slows down). Plus people are obsessed with the limited writes that you can do on an SSD (even though its in the billions) so in a sense it wastes writes.

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

Ah okay. So it's not a huge deal if I were to accidentaly defrag one?

Link to comment
Share on other sites

Link to post
Share on other sites

There is no need to defrag it because it is digital, not mechanical storage. All the data on an SSD takes the same time to access because there is no spinning disk like there in a HDD which has to move to where the data is.

Defragging is only for hard drives.

 

Defragging an SSD will wear out its nand flash cycles shortening its life span while giving 0 improvement.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

Ah okay. So it's not a huge deal if I were to accidentaly defrag one?

 

Accidentally doing it once or twice will be fine.

Doing it routinely over years can have negative impact on SSD.

BTW I don't think it's even possible to defrag SSD on recent OSs.

Two revolutionary dance tones

Link to comment
Share on other sites

Link to post
Share on other sites

Accidentally doing it once or twice will be fine.

Doing it routinely over years can have negative impact on SSD.

BTW I don't think it's even possible to defrag SSD on recent OSs.

my win8 tablet had it set to auto defrag every week.... i turned that off thankfully.

My Car: http://linustechtips.com/main/topic/274320-the-long-awaited-car-thread/?p=4442206


CPU: i5 4590 |Motherboard: ASRock H97M PRO4|Memory: Corsair Vengance 8gbs|Storage: WD Caviar Blue 1TB|GPU: ZOTAC GTX 760 2gb|PSU: Thermaltech TR2 500W|Monitors: LG24M35 24" & Dual 19"|Mouse:Razer DeathAdder 2013 with SteelSeries Qck mini|Keyboard: Ducky DK2087 Zero MX Red|Headset: HyperX Cloud|Cooling: Corsair 120mm blue LED, Lepa vortex 120mm, stock 120mm|Case:Enermax Ostrog Blue Windowed


 

Link to comment
Share on other sites

Link to post
Share on other sites

my win8 tablet had it set to auto defrag every week.... i turned that off thankfully.

Huh, that's strange.

On my windows machines (windows 7 and windows 8.1) the OSs automatically recognized SSDs and removed them from the defrag schedule.

Two revolutionary dance tones

Link to comment
Share on other sites

Link to post
Share on other sites

Huh, that's strange.

On my windows machines (windows 7 and windows 8.1) the OSs automatically recognized SSDs and removed them from the defrag schedule.

Not always. Install win 7 brand new comp 2 months ago and it was set to on. Install another ssd on another comp, it defaulted off. Both windows 7 - which is supposed to detect non moving drives and turn defrag off. Both Adata drives.

Link to comment
Share on other sites

Link to post
Share on other sites

no benefit as SSD's don't really have seek time (the time it takes for the write head to find all parts of the file, so if its fragmented you can see why it slows down). Plus people are obsessed with the limited writes that you can do on an SSD (even though its in the billions) so in a sense it wastes writes.

Thats not true at all. Modern SSDs are only good for a few 1000 rewrites.

+°´°+,¸¸,+°´°~ Glorious PC master gaming race :wub: ~°´°+,¸¸,+°´°+
BigBox: Asus P8Z77-V, 3570k, 8GB Ram, Intel 180GB & Sammy 750GB, HD4000, W7
PiBox: Rasberry Pi, BCM @ 1225Mhz ^_^ , 256MB Ram, 16GB Storage, pIO, Raspbian

Link to comment
Share on other sites

Link to post
Share on other sites

No one has mentioned the reason why it's actually useless to defrag an ssd: you can't. There's a layer of abstraction between the block addressees that the file system sees and the actual location of each block in the flash. The ssd controller keeps a mapping of this translation in order to be able to read the same logical blocks as the physical blocks move.

 

SSDs need this abstraction layer so that they can speed up read-modify-write operations. They redirect the write to a clean page somewhere instead of waiting for the old page to erase since erasing is slow. In essence, the flash controller moves the data to a physically different page on the drive, but from the perspective of the file system it hasn't moved.

 

Since the file system doesn't know where blocks actually are on the disk, it can't re-order them in any useful way. Thus, the fs can't defrag the disk.

 

This really isn't a problem though because ssds dont have seek latency, so it doesn't matter if blocks are contiguous or not.

Workstation: 3930k @ 4.3GHz under an H100 - 4x8GB ram - infiniband HCA  - xonar essence stx - gtx 680 - sabretooth x79 - corsair C70 Server: i7 3770k (don't ask) - lsi-9260-4i used as an HBA - 6x3TB WD red (raidz2) - crucia m4's (60gb (ZIL, L2ARC), 120gb (OS)) - 4X8GB ram - infiniband HCA - define mini  Goodies: Røde podcaster w/ boom & shock mount - 3x1080p ips panels (NEC monitors for life) - k90 - g9x - sp2500's - HD598's - kvm switch

ZFS tutorial

Link to comment
Share on other sites

Link to post
Share on other sites

No one has mentioned the reason why it's actually useless to defrag an ssd: you can't. There's a layer of abstraction between the block addressees that the file system sees and the actual location of each block in the flash. The ssd controller keeps a mapping of this translation in order to be able to read the same logical blocks as the physical blocks move.

 

SSDs need this abstraction layer so that they can speed up read-modify-write operations. They redirect the write to a clean page somewhere instead of waiting for the old page to erase since erasing is slow. In essence, the flash controller moves the data to a physically different page on the drive, but from the perspective of the file system it hasn't moved.

 

Since the file system doesn't know where blocks actually are on the disk, it can't re-order them in any useful way. Thus, the fs can't defrag the disk.

 

This really isn't a problem though because ssds dont have seek latency, so it doesn't matter if blocks are contiguous or not.

Yeah basically modern OS's support TRIM, which is the defrag-like "housekeeping" functionality of the SSD, in part which you just described.

 

Older OS's like Windows XP don't support TRIM, and must be "manually optimized" using software provided by the SSD manufacturer (Samsung SSD Magician is one example). My former boss bought a couple SSD's for his Windows XP laptop. He'll probably stick with XP until the day he dies.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

They are fragmented by design. As long as the controller is capable, greater fragmentation = greater speeds. It's that's why higher capacity drives, with more NAND chips, are faster than smaller drives, with fewer chips. Data can be accessed more quickly when it's spread over more chips and the SSD moves data around to where it's read quickest. When seek time latency is negligible it pays to keep it fragmented. Fragmentation also means all NAND chips are written,erased&read to/from equally, rather than degrading the same sectors with repeated use.

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

×