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

    • Fake Superman doing the Anti-Trump PR for us, good man !
    • Hello, I am not as familiar with AMD CPUs as I am with Intel's, but as I understand it, that's a mid-range CPU from about three years ago.  I would think it to be fine for everyday casual-type use.  A larger SSD might be better, but with storage prices these days that's a decision that has to be carefully thought about. Regards, Aryeh Goretsky  
    • Ocenaudio 3.19.5 by Razvan Serea  Ocenaudio is a full featured, fast and easy to use audio and music editor. It is the ideal software for people who need to edit and analyze audio files without complications. Ocenaudio also has powerful features that will please more advanced users. To assist ocenaudio development, a powerful toolset of audio editing, analysis and manipulation called Ocen Framework was created. ocenaudio is also based on Qt framework, a well known library for cross-platform development. Cross-platform support ocenaudio is available for all major operating systems: Microsoft Windows, Mac OS X and Linux. Native applications are generated for each platform from a common source, in order to achieve excelent performance and seamless integration with the operating system. All versions of ocenaudio have a uniform set of features and the same graphical interface, so the skills you learn in one platform can be used in the others. VST plugins support Ocenaudio supports VST (Virtual Studio Technology) plugins, giving its users access to numerous effects. Like the native effects, VST effects can use real-time preview to aide configuration. Real-time preview of effects Applying effects such as EQ, gain and filtering is an important part of audio editing. However, it is very tricky to get the desired result by adjusting the controls configuration alone: you must listen the processed audio. To ease the configuration of audio effects, ocenaudio has a real time preview feature: you hear the processed signal while adjusting the controls. The effect configuration window also includes a miniature view of the selected audio signal. You can navigate on this miniature view in the same way as you do on the main interface, selecting parts that interest you and listening to the effect result in real time. Multiselection for delicate editions To speed up complex audio files editing, ocenaudio includes multi-selection. With this amazing tool, you can simultaneously select different portions of an audio file and listen, edit or even apply an effect to them. For example, if you want to normalize only the excerpts of an interview where the interviewee is talking, just select them and apply the effect. Eficient edition of large files With ocenaudio, there is no limit to the length or the quantity of the audio files you can edit. Using an advanced memory management system, the application keeps your files open without wasting any of your computer's memory. Even in files several hours long, common editing operations such as copy, cut or paste happen almost instantly. Fully featured spectrogram Besides offering an incredible waveform view of your audio files, ocenaudio has a powerful and complete spectrogram view. In this view, you can analyze the spectral content of your audio signal with maximum clarity. Advanced users will be surprised to find that the spectrogram settings are applied in real time. The display is updated immediately when altering features such as the number of frequency bands, window type and size and dynamic range of the display. Ocenaudio 3.19.5 changelog: Fixes crashes related to audio devices on Windows (DirectSound and ASIO) Fixes several crashes and memory corruption issues Fixes opening several headerless files at once, which previously dropped all but one Improves batch export by suggesting and remembering the destination folder Fixes accented and non-Latin characters in VST plug-in and compressed-archive file names Adds zstd compression support and updates the archive library Other bug fixes and improvements Download: Ocenaudio 64-bit | Portable | ~40.0 MB (Freeware) Download: Ocenaudio for Linux and Mac OS View: Ocenaudio Homepage | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I did think about a Echo show once and it would be useful to see what my cameras see. But my brother got one and I changed my mind. Adverts and not really worth the price just to see my cameras. I have a load of dots and a Echo Gen 4, they will do.
  • 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
      501
    2. 2
      +Edouard
      204
    3. 3
      PsYcHoKiLLa
      145
    4. 4
      Steven P.
      72
    5. 5
      FloatingFatMan
      68
  • Tell a friend

    Love Neowin? Tell a friend!