Should I defragment my (18% fragmented) SSD?


Recommended Posts

that's secure erase. it doesn't blank out the cells, just throws away the encryption key and generates a new one. you'd still need to TRIM it (the optimizer tool) to blank the cells out.

secure erase is supose to blank out all sectors / memory cells thats part of the secure erase ATA command standard

"the general consensus seems to be that it's unnecessary on SSDs and if anything, it shortens the life of them."

"Should I defragment it?"

Yes. Go ahead.

no, do not go ahead

i've been wondering if defraging is actually needed on an SSD, and there are 2 things that i always come accross.

1, the whole thing that SSD don't have a disc so arn't effected by fragmented files.

2, defragging the drive wares it out and lowers the life expectancy of the drive.

imo both are true and it's really not worth doing, no matter how annoying it is to see that the drive is fragmented, it will keep happening as you add and remove files, and it's only going to lower the life of the drive rather than speed things up.

fragmentation is dependent on the file system - NTFS-formatted hard drives will get fragmented, whether theyre thumb drives, external hds, internal hds or SSDs.

Put your computer on sleep mode few the next few nights and your SSD will get a speed boost because of TRIM

if the computer is sleeping, then TRIM wont work... computer must be on and idle.

sequential read is still a good deal faster then random read on all the SSD's I've worked with so far... seems like it shouldn't be that way but all the benchmarks have been that way

I'm putting this mainly on the drives chipset being crap still in a bunch of cases

wrong - think of it this way. What's easier and faster to do - read a book from start to finish, or jump from page 1 to 47, to 50, to 215, to 230, to 300, to 2, and so-on?

secure erase is supose to blank out all sectors / memory cells thats part of the secure erase ATA command standard

yes, correct - Secure Erase will write 0s to the entire SSD.

see here

if the computer is sleeping, then TRIM wont work... computer must be on and idle.

The computer does not have to be idle, TRIM is a command that's sent whenever a file is deleted/free space is created. Unless the computer deletes files while it's idle there should be no reason it's sending TRIM commands while idle.

wrong - think of it this way. What's easier and faster to do - read a book from start to finish, or jump from page 1 to 47, to 50, to 215, to 230, to 300, to 2, and so-on?

While that's true for books, and I somewhat agree, it doesn't make much sense for SSD's. Where the data is physically stored on a SSD is has no relation to where the file is located according to the file system's logical address. A file can be in 50 continuous blocks according to the filesystem, but physically on the SSD they can be spread out everywhere.

yes, correct - Secure Erase will write 0s to the entire SSD.

see here

Secure Erase is not the same as blanking a SSD. Secure erase will write 0's to the entire drive, blanking will restore a SSD to it's original condition by marking all the sectors as free and usable. Notice how at the link you posted it says it may actually decrease performance.

The computer does not have to be idle, TRIM is a command that's sent whenever a file is deleted/free space is created. Unless the computer deletes files while it's idle there should be no reason it's sending TRIM commands while idle.

yep, youre right - i always thought the computer had to be idle for TRIM to initialize, but it doesnt.

wrong - think of it this way. What's easier and faster to do - read a book from start to finish, or jump from page 1 to 47, to 50, to 215, to 230, to 300, to 2, and so-on?

how was what I said wrong? you just said what I said... I said sequential reads on a SSD are faster then random reads, you said sequantial reading is faster then random reading..... *scratches head* if a SSD is defragmented its files are moved into sequential order, thus faster reading... all the ones we tested random reading caused slow downs, we saw this the most on older SSD's that had badly designed controller chips or bad firmware designs that slow down when it has to do large amounts of random reads... please explain how I was wrong again? the last drive we tested could read at 350MB/s when the file was sequential, and only 221MB/s when it was "fragmented" sure its faster then a hard drive, but it's still slower, the company did put out a firmware upgrade that pushed that up to 270MB/s but still is slower, its something to do with the controller chips firmware and how it reads blocks of memory

I have perfect disk server on my server, and when I ran it on my OS drive, which is an SSD, it was saying that performance was around 80% or so. There were alot of fragmented files, so even though I know Defragging can shorten the life of an SSD, I did it anyway. After it was done, performace went up to 98%, and you know what? SSDLife still says 98% remaining (after almost a year of always being on), with an expected life time of sometime in 2021. Overall I'd say as long as you're not doing it every 6 hours, go ahead and defragment it.

Most things said in this topic about secure erase are wrong. When you do it properly with the proper ATA command, it does NOT write 0's to all cells.

When you secure erase a drive, the first thing you do is password it, using the proper command. Then with secure-erase you delete the password. What this process does is first mark all cells as available (it doesn't empty them) and then create an encryption key for the drive. By then secure-erasing the drive, the security key is deleted and everything basically becomes unreadable, and all cells are again marked as available. It looks as if the drive is empty, and the drive thinks it's empty, but it's not. Secure-erasing my 128GB Toshiba SSD's only took a few seconds.

A lot of people here seem to have no clue how SSD's work. Running defragmenting tools on an SSD will not defragment them AT ALL. The only thing they will do is make the OS 'think' they're defragmented. If your defragmenter has a graphical display, all it will do is make the blocks look pretty.

The physical blocks on the SSD are completely abstracted from the OS. The OS addresses data using logical blocks. The SSD stores data on physical blocks. The SSD controller is in charge of keeping track of which logical blocks map to which physical blocks. This mapping is constantly changing due to wear-leveling and garbage collection routines. There is no way for the OS to know where, physically on the SSD data is.

Let me try to explain what's happening before more people decide to wear out their SSD's for no reason.

With HDD's the logical blocks always mapped to the same physical blocks. If the OS saved a file to logical blocks 0-10. These would be physically on blocks 0-10 on the HDD. Say for example, now the file is modified and saved again, to blocks 0-10, it will physically be in the same location.

Same example with an SSD: The OS tries to write to logical blocks 0-10, the SSD controller can place the file ANYWHERE, physically on the SSD. Let's say it chooses to save it to physical blocks 100-110. The controller will now remember that when the OS asks for blocks 0-10, return what's in 100-110. From the OS point of view the data is still at 0-10. Now, let's say the OS modifies the file and save it again to logical blocks 0-10. The SSD controller will mark physical blocks 100-110 as unused, and write to physical blocks 200-210, for wear-leveling purposes, and the controller will remember that logical address 0-10 now physically points to blocks 200-210. All this time the OS thinks it's writing to a single location, but the SSD is writing data all over the place.

When the disk defragmenter is busy making the picture of blocks pretty and color-coordinated, the SSD controller is writing wherever the hell it wants.

TL:DR There is no point in defragmenting SSDs, the physical location of the blocks on an SSD can be anywhere, even when the OS reports it at 0% fragmented.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The only reason I want to know where you from is because if you are not from the U.K, then why should you care what we in the U.K do or don't do? Racist I am not, I am fed up with the amount coming over here and feel they can come over here and think we need to support them. Do you know how much it costs this country to support these people coming over here? Even when we give them a place to live it is not good enough. We had a barge that was being used to house immigrants, oh but that was not good enough. A mate said to me at the time, when he was homeless, he would have been happy to live on the barge, instead of ending up sleeping on a bench on the beach. I am not scared to say what my family heritage is, unlike you who is scared to say where they are from or where they live. Father side U.S, mother side Wales, still have family living in the U.S. A mate who sadly died a few years ago, had a load of people from different races recording in his studio, I got on with all of them. Skin colour don't bother me, where they are from don't bother me. Religion don't bother me as long as they don't push it onto me and it is not crazy stuff. I am not religious. But if you are not living in the U.K, then why should you care if we are in the E.U or not? This the problem, too many people poking their noses into where it don't belong. But you believe what you believe, if you think I am racist, then be it, I really do not care. Just grow a pair
    • If he hasn't been able to figure that out, then why is he obsessed with tariffs? Because that's one of the most prominent tools to level the playing field when you have high cost of labor.
    • Microsoft released Windows 11 KB5102558, KB5095615 Setup and Recovery updates by Sayan Sen This past week Microsoft released the newest preview update (C-release) under KB5095093. Alongside those, Microsoft also released new dynamic updates. For those who may not know, dynamic updates bring improvements to the Windows Recovery process in the form of Windows Recovery Environment (WinRE) updates, which are also called Safe OS updates. The dynamic updates also affect the Setup file binaries in the form of Setup updates. These Dynamic Update packages are meant to be applied to existing Windows images prior to their deployment. Dynamic Updates also help preserve Language Pack (LP) and Features on Demand (FODs) content during the upgrade process. VBScript, for example, is currently an FOD on Windows 11 24H2. This time both recovery and setup updates were released for Windows 11. The company writes: "KB5095186: Safe OS Dynamic Update for Windows 11, version 26H1: June 23, 2026 This update makes improvements to the Windows recovery environment (WinRE). After installing this update, the WinRE version installed on the device should be 10.0.28000.2335. KB5102558: Setup Dynamic Update for Windows 11, versions 24H2 and 25H2: June 23, 2026 This update makes improvements to Windows setup binaries or any files that setup uses for feature updates in Windows 11, version 24H2 and Windows 11, version 25H2. KB5095615: Safe OS Dynamic Update for Windows 11, versions 24H2 and 25H2: June 23, 2026 This update makes improvements to the Windows recovery environment (WinRE). After installing this update, the WinRE version installed on the device should be 10.0.26100.8737." Microsoft notes that both the Recovery and Setup updates will be downloaded and installed automatically via the Windows Update channel.
    • The high cost of labor and operating within the US. Donald hasn't been able to figure that out--pathetic.
  • Recent Achievements

    • Conversation Starter
      jessse3334 earned a badge
      Conversation Starter
    • Reacting Well
      JuvenileDelinquent earned a badge
      Reacting Well
    • One Month Later
      Excellence2025 earned a badge
      One Month Later
    • Week One Done
      Excellence2025 earned a badge
      Week One Done
    • Week One Done
      flexorcist earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      508
    2. 2
      +Edouard
      200
    3. 3
      PsYcHoKiLLa
      151
    4. 4
      Steven P.
      73
    5. 5
      macoman
      62
  • Tell a friend

    Love Neowin? Tell a friend!