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

    • draw.io Desktop 30.2.6 by Razvan Serea draw.io desktop is a downloadable security-first diagramming application that runs on Windows, MacOS and Linux. Creating diagrams in the desktop app doesn’t need an internet connection. This is useful when you are disconnected or when you must create diagrams in a highly secure environment, where data protection is of the utmost importance. When you use the draw.io desktop app, your diagrams will be stored on your local device. Because this is a stand-alone application, also designed to run offline, there are no interfaces to cloud storage platforms available. Of course, you can still store your diagrams in folders that are synchronised to your cloud storage if you wish. Easy-to-use diagram editor The draw.io apps work just like the office and drawing tools you are used to using. Drag and drop shapes from the shape libraries and drag to draw connectors between them. Drag connectors to add waypoints and set a precise shape and position, or let them reroute automatically. Double click and start typing to add a label to anything. Create tables and swimlane flows with a familiar tool. Style shapes and connectors with customisable palettes, sketch options, fonts and text formatting tools. Search for shapes, including in open-source icon libraries. Use our vast libraries of shapes and templates, organised into logical categories, to create a range of diagrams and infographics. Generate diagrams from text descriptions using our smart templates. Diagram faster with keyboard shortcuts. draw.io Desktop 30.2.6 changelog: Uses electron 42.5.0 #2452 Updates to draw.io core 30.2.6. Download: draw.io 64-bit | Standalone (Open Source) Download: draw.io 32-bit | ARM64 | ARM64 Standalone Links: draw.io Home Page | Project page @GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • 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
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      +Edouard
      216
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      Steven P.
      74
    5. 5
      FloatingFatMan
      70
  • Tell a friend

    Love Neowin? Tell a friend!