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

    • Opinion. All you did was blame Democrats for everything. You offered nothing but a hit piece to support your pro Trump, anti union right wing ideology.
    • Excuse me for having an opinion, fella'... (Why am I not surprised?...) Congrats on your very informative post however...
    • By the sounds of that wall of Fox News propaganda gibberish attacking the Democratic Party you've already had plenty of "juices" flowing this morning. You've ruined what could have been a productive comment thread.
    • (Topic to get the juices flowing this Sunday morning!...) Actually, the situation has almost nothing to do with "lack of skills", especially since assembly-line skills can be taught to anyone, including Americans, certainly. Rather, the inadequacy-to-impossibility of large-scale tech manufacturing in America today, and the reasons why America finds tech manufacturing completely onerous in the 21st century, has to do with politically driven laws amid a plethora of non-scientific, utterly politicized "science-fact" that is patently false, punitive business taxation at every turn, an array of judicial fines of unimaginable scope and complexity, and, last but not least, American unionization strictures that serve to actually slay job creation and hobble all such manufacturing endeavors in America before they can get off the ground. Globalism emerged, they tell us, as the needed answer to American hubris and an unholy American drive to excel. Unless one is buried under mounds of political propaganda, it's easy to see the absurdity of labeling the employees of SpaceX, for instance, as "unskilled labor"... Etc. ad infinitum. At one time in the recent past, American manufacturing prowess was the envy of the world in a wide variety of technical fields! The current federal and state government roadblocks against America becoming competitive globally in tech manufacturing are considerable, it's true, as anyone with a working brain knows. But remarkably, that is only half the story! The other half of the story is, of course, the corporations themselves... Chinese tech manufacturing is simply unassailable in terms of profits, because the Chinese government wants to see its tech manufacturing second-to-none globally so that no companies/nations can compete in terms of ROI, and China has completely succeeded in that goal. Let's tic-off a few things: *Chinese tariff policies are set according to what is considered best for Chinese business, Chinese employees, and the Chinese people. Huge difference with how things are done with tariffs in the US--as the US government (SCOTUS in this case, Congress in others) plainly feels that tariffs are "unfair" for the limited number of citizens who may pay them, whereas nothing is "unfair" when Congress considers the Personal Income Tax rates to be infinitely hike-able, along with infinitely enlarging annual budget deficits. *The Chinese government boldly subsidizes Chinese companies to artificially amplify their profits. *The Chinese government deliberately refuses to avidly demonize Chinese businesses and does not consider Chinese businesses "the enemy", so very unlike American (D)s these days. *Chinese labor laws and businesses are allowed to set their own labor policies according to what Chinese companies consider is best for companies and their employees... Simply put, American workers in tech manufacturing are not allowed to set their own labor policies! * One additional problem corporations have that I also do not sympathize with is they don't want to pay to train their American employees. They could easily do so, but would rather not have to pay for it. I find that pathetic, actually. It is the height of hypocrisy for Americans to decry working conditions in China while simultaneously ensuring that American products are manufactured in China, not in the US, simply to maximize profits. There is nothing wrong with making a profit, of course, absolutely nothing. But there is plenty wrong with attempts to normalize hypocrisy of this kind! But rank hypocrisy and the (D) party in the US are longtime bedfellows... The current government in Washington is working overtime to see if it can toss out the horribly poor, failed economic policies of the past, while the (D)s still in Washington work very hard to bring back the stupidity whenever possible. With the right policies in place, America can be an infinitely competitive manufacturer.
  • 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
      198
    3. 3
      PsYcHoKiLLa
      152
    4. 4
      Steven P.
      73
    5. 5
      FloatingFatMan
      62
  • Tell a friend

    Love Neowin? Tell a friend!