why is defragging not really a thing anymore?

770 views

I was born in 1973, got my first computer in 1994, defragging was part of regular maintenance. I can’t remember the last time I defragged anything, even though I have several devices with hard drives, including a Windows laptop. Has storage technology changed so much that defragging isn’t necessary anymore? Is it even possible to defrag a smart phone hard drive?

edit to add: I apologize for posting this same question several times, I was getting an error message every time I hit “post”… but from looking around, it seems I’m not the only one having this problem today.

In: 821

40 Answers

Anonymous 0 Comments

With hard drives, this is still necessary if you’re using a filesystem such as NTFS or FAT32, both of which become fragmented easily and still need to be regularly degragmented. Some filesystems (such as Mac OS HFS+ or Linux EXT4) don’t become fragmented easily because the operating system will physically move files on the disk as data is written to ensure that they don’t become fragmented to begin with. These filesystems rarely require defragmentation as a result. *(Technically, it is still possible for EXT4 or HFS+ filesystems to become fragmented in some very specific circumstances, namely when the disk is almost completely full, but this is rare.)*

With SSDs, it’s a totally different story and defragmentation is actually detrimental. Not only do they lack moving parts (and therefore aren’t bogged down by fragmentation), but the SSD controller itself purposefully fragments the data as a part of its wear leveling algorithms anyway. This happens invisibly to the OS and it takes place at the physical hardware level. Even if you were to defragment it by the operating system, the physical flash itself would still scatter all of the data throughout the disk to make sure that all of the blocks are wearing evenly, even if it “reports to the OS” that the data isn’t fragmented.

For this reason, defragmenting SSDs has no benefit on any filesystem. It doesn’t actually ensure that the physical data is less fragmented (it still will be fragmented by the wear leveling controller on the physical flash anyway). It just fools the OS into *thinking* that it’s not fragmented, which has no real benefit and just adds additional wear and tear to the SSD.

Anonymous 0 Comments

Unless you changed the windows settings it happens automatically in the background, I have it disabled and just run defraggler now and again instead, my SSD will auto trim though.

Anonymous 0 Comments

If you right click on your drive and select “Properties”, and then in the “Tools” tab, click “Optimize”, a window will open. It will tell you when the last “optimize” of each drive happened. In my case, all drives were “optimized” 22 days ago. I did not start it and I never saw it happen.

So Windows is just doing it for you in the background.

Anonymous 0 Comments

Because it is called “Optimize Drives” now.

That includes “Defragmentation” for HDD drives and it is done automatically by Windows. Default setting is “weekly”, but it can be changed.

For Solid State Drives, that is a different process, called “Trimming”.

Anonymous 0 Comments

There are three major effects:

SSDs have generally replaced HDDs in many cases. SSDs do not have any seek time at all, and thus fragmentation does not matter*. In fact, SSDs internally remap themselves on write to balance the load to help ensure consistent wear on the drive – you can only write a given segment a fixed number of times before it goes bad**. Due to this, defragging an SSD not only provides no benefit, but it actually harmful to the drive.

Newer formatting methods, such as EXT4 and NTFS, have designs that tend to prevent fragmentation a lot better compared to the older methods like FAT. This drastically reduced the benefit of defragging a drive.

Operating systems also got smarter and started automatically defragging HDDs in the background. For Windows, I think this started around Windows XP. This means any HDDs you are using will get defragmented even if you don’t manually start the process.

It is also worth noting that fragmentation should only occur when you create or make a file larger after deleting or making one smaller by a segment. This often means backup disks will have very low rates of fragmentation.

* Well, there is still a tiny bit of overhead as the OS may need to make an extra disk request on a fragmented file, but that overhead will be on the order of nanoseconds compared to the tens of milliseconds of a HDD seek.

** As a note, for modern SSDs, this number is typically in the hundreds of thousands per segment, and possibly well into the millions. Remapping means you are unlikely to see problems for an additional order of magnitude as well.

Anonymous 0 Comments

The reason fragmentation is important to eliminate on an older spindle disk is the way the data is written and read. The disk inside a hard disk drive is literally a round plate, and data is written by a movable magnetic head to magnetic rings along the disk. An ideal unfragmented file on a rotating HDD spindle would have all the bits written along a single ring or series of adjacent rings so that it literally takes less time for the moving head to travel over the surface of the disk to read the data. You can kind of think of it like a line of vehicles offloading at the airport, you have 3 busses of kids to offload, but only a couple vehicles can offload at the same time. If all 3 busses are right in line, it goes quicker than if they are all spaced out so that you have to wait between offloads. A heavily fragmented file on a rotational Hard disk drive is just like that, data pieces may be all over the disk, some on the inner rings, some outer, or some on the same ring but spaced far apart. Defragmentation literally moves smaller data chunks out from between larger data that would benefit from being closer and more compact to speed up the read and write process. Its why you need a certain amount of free space to defragment a disk.

With a solid state Drive, there aren’t any moving parts, just different memory cells. It is literally no faster to access any of the memory cells in the array than any other cell, so there is no benefit to having your data physically congruent like with a rotational HDD. The SSD can just read or write from any point in the array as fast as its base speed will let it, so it doesn’t care if the file is split all over. What a SSD really does care about though is the number of reads and writes of those cells over time, since they literally wear out. Defragmentation adds needless reads and writes to those cells, and does absolutely nothing for performance, so it actually adds a small but meaningful amount to accelerating the death of a SSD if you regularly defrag it. That being said, most SSD’s in home computers will never actually manage to wear out a cell in the drive before replacing it with a bigger newer faster one, but it is a concern.

So, TLDR: Spinning rotational hard drive spindles need data bits close together in a row to make it faster to read and write, SSD doesn’t care and excess reading and writing will actually kill the drive faster so Defrag = bad on a SSD.

Anonymous 0 Comments

Originally we used Hard Drives which you can think of as small little record players.

When you save your first few files they are laid down on the record like the first tracks of your LP. Eventually you might fill up your record, and decide to delete a few files to make room for your new game. So you pick a few files that you are no longer using and remove them. Unfortunately statistically these files that you removed are unlikely to be sequential tracks on the record. So when you install your new game, you end up putting part of the game on the first open track until that fills up, and then jump to the next open track until you have used up the space that you needed.

The issue now is that you can’t speed up the record player as it is always running at the max speed that it can. So as you load your game, you have to load each part of the file, and then skip to the next spot etc etc, which is much slower than just reading the whole thing as a single uninterrupted track.

Defragging is just the process of moving data around on the physical record to make as many fragmented tracks, sequential and unbroken again, hence defragmenting.

Modern computers are fast enough now that they can do this process either in the background or as you are accessing the data so it is not a monolithic event that you do once in a while. Also with SSDs you no longer have long seek and load times as data can be accessed from anywhere on the device at the same rate, so its not really a problem.

Anonymous 0 Comments

**What does defragmentation do**

Imagine you have 3 Programs installed, each having multiple files that all need to be accessed. Because the HDD writes the data on a platter physically, it can read things faster if they are close together. Perfect arrangement would be:

|AAAAABBBBBBCCCCCC..|

(for files belonging to program A B and C)
now if you install and uninstall programs regularly you end up in this configuration before installing program C:

|AAAAA….BBBBBB….|

installing program C would now lead to:

|AAAAACCCCBBBBBCC..|

In this configuration your HDD need to move its write-head/the physical disk more for loading all C-Files than in the optimal layout thus making the access slower.

Defragmentation reorders the “Fragmented” files that belong together to the optimal arrangement.

**Why its not needed with SSDs (and other flash memory)**

SSDs dont have any moving parts, accessing any part of the disk is basically the same speed. There would be no benefit in reordering the data.

An SSD does other things that are more relevant to it than HDDs. Eg. writing data to areas, that have the least number of writes to evenly distribute the wear and prolong the lifetime of the SSD, those things are (mostly) done automatically within the SSD though.

Anonymous 0 Comments

Imagine you have to put all the data I give you in crates, as efficiently as possible, and you NEVER get more crates to put things in.

Now imagine that the crates can ONLY hold papers in them up to the top of the crate.

Now I give you – over a course of years – huge amounts of folders and papers to put in those crates but all for different projects.

At first, you’ll want to put one set of folders in each crate, to keep them all together. That works fine. But eventually all the crates will have something in.

At some point, you’re going to have to split a folder and put half of it in one crate and half in another because you have no more empty crates and moving things between crates is slow and expensive (on old disks).

That means that when I ask for that particular folder back, you’re going to need to find two, maybe several, maybe HUNDREDS of crates in order to get all the folder pieces back together for it. That will take you far longer than just handing me a complete folder out of a single crate.

As time goes by, I might not need some folders any more and ask you to destroy them. But they might be spread out among several crates, so you have to delete all the parts. That leaves gaps in some crates at the beginning of your pile of crates, gaps in some crates at the end, and maybe full crates in between. Now when I give you another folder you have to split that folder into parts and put some in the first crates, and then run to the other end and put the rest in the last crates.

At some point, it begins to affect how fast you can find things, and it’s not logical or sensible. So you might decide one day to go through all the crates, put all the folders that are to do with the same project together, keep them all in crates that are next to each other, sort them all into order so you can find things easily again.

That’s defragging. Because of the technical limitations of machines and storage, you didn’t want to make the file reading/writing process any more complicated than necessary as it would slow the machine down when you were using it. So you did things “quickly” when you were given or asked for data even if that wasn’t sensible, and you never had time to “tidy up”. Which meant that eventually the mess built up and you HAD to defrag.

Modern OS simply do things more sensibly, because they have the processing and storage power to do so. And modern drives (SSD and NVMe) literally don’t care how far apart files are. They can get to a crate next to you just as quickly as a crate on the very end of the disk. Old storage that had spinning disks had to wait for the data to come around again, so accessing lots of different crates was slow and clunky. Modern “disks” aren’t even disks any more, and that’s no longer a factor. So no matter how “cluttered” or “disorganised” your storage is nowadays, there’s no point defragging as it won’t make the drive get files or folders any faster, and the OS is much better at not breaking up files like that in the first place if it can.

Anonymous 0 Comments

The short answer is that fragmentation can still happen, but certain techniques and technologies have made it such that it won’t impact you until your drive fills up.

Aside from the fact that we have SSDs which aren’t impacted by fragmentation, we also have newer filesystems that are designed to avoid fragmentation with various techniques that may not have previously been viable in years prior. For example, they’ll leave space between the files so that when the files are updated there is wiggle room, so that the new contents don’t need to be split unless the file has grown significantly, or they’ll move the file if there is another contiguous empty space large enough to accommodate, and/or will defragment “offline” when fragmentation reaches a certain threshold. Fragmentation still can happen, but typically isn’t a problem until your drive becomes so full that it’s impossible for any of these mitigations to be done (ie, there is no contiguous area that is empty for it to move the file into).

0 views

I was born in 1973, got my first computer in 1994, defragging was part of regular maintenance. I can’t remember the last time I defragged anything, even though I have several devices with hard drives, including a Windows laptop. Has storage technology changed so much that defragging isn’t necessary anymore? Is it even possible to defrag a smart phone hard drive?

edit to add: I apologize for posting this same question several times, I was getting an error message every time I hit “post”… but from looking around, it seems I’m not the only one having this problem today.

In: 821

40 Answers

Anonymous 0 Comments

With hard drives, this is still necessary if you’re using a filesystem such as NTFS or FAT32, both of which become fragmented easily and still need to be regularly degragmented. Some filesystems (such as Mac OS HFS+ or Linux EXT4) don’t become fragmented easily because the operating system will physically move files on the disk as data is written to ensure that they don’t become fragmented to begin with. These filesystems rarely require defragmentation as a result. *(Technically, it is still possible for EXT4 or HFS+ filesystems to become fragmented in some very specific circumstances, namely when the disk is almost completely full, but this is rare.)*

With SSDs, it’s a totally different story and defragmentation is actually detrimental. Not only do they lack moving parts (and therefore aren’t bogged down by fragmentation), but the SSD controller itself purposefully fragments the data as a part of its wear leveling algorithms anyway. This happens invisibly to the OS and it takes place at the physical hardware level. Even if you were to defragment it by the operating system, the physical flash itself would still scatter all of the data throughout the disk to make sure that all of the blocks are wearing evenly, even if it “reports to the OS” that the data isn’t fragmented.

For this reason, defragmenting SSDs has no benefit on any filesystem. It doesn’t actually ensure that the physical data is less fragmented (it still will be fragmented by the wear leveling controller on the physical flash anyway). It just fools the OS into *thinking* that it’s not fragmented, which has no real benefit and just adds additional wear and tear to the SSD.

Anonymous 0 Comments

Unless you changed the windows settings it happens automatically in the background, I have it disabled and just run defraggler now and again instead, my SSD will auto trim though.

Anonymous 0 Comments

If you right click on your drive and select “Properties”, and then in the “Tools” tab, click “Optimize”, a window will open. It will tell you when the last “optimize” of each drive happened. In my case, all drives were “optimized” 22 days ago. I did not start it and I never saw it happen.

So Windows is just doing it for you in the background.

Anonymous 0 Comments

Because it is called “Optimize Drives” now.

That includes “Defragmentation” for HDD drives and it is done automatically by Windows. Default setting is “weekly”, but it can be changed.

For Solid State Drives, that is a different process, called “Trimming”.

Anonymous 0 Comments

There are three major effects:

SSDs have generally replaced HDDs in many cases. SSDs do not have any seek time at all, and thus fragmentation does not matter*. In fact, SSDs internally remap themselves on write to balance the load to help ensure consistent wear on the drive – you can only write a given segment a fixed number of times before it goes bad**. Due to this, defragging an SSD not only provides no benefit, but it actually harmful to the drive.

Newer formatting methods, such as EXT4 and NTFS, have designs that tend to prevent fragmentation a lot better compared to the older methods like FAT. This drastically reduced the benefit of defragging a drive.

Operating systems also got smarter and started automatically defragging HDDs in the background. For Windows, I think this started around Windows XP. This means any HDDs you are using will get defragmented even if you don’t manually start the process.

It is also worth noting that fragmentation should only occur when you create or make a file larger after deleting or making one smaller by a segment. This often means backup disks will have very low rates of fragmentation.

* Well, there is still a tiny bit of overhead as the OS may need to make an extra disk request on a fragmented file, but that overhead will be on the order of nanoseconds compared to the tens of milliseconds of a HDD seek.

** As a note, for modern SSDs, this number is typically in the hundreds of thousands per segment, and possibly well into the millions. Remapping means you are unlikely to see problems for an additional order of magnitude as well.

Anonymous 0 Comments

The reason fragmentation is important to eliminate on an older spindle disk is the way the data is written and read. The disk inside a hard disk drive is literally a round plate, and data is written by a movable magnetic head to magnetic rings along the disk. An ideal unfragmented file on a rotating HDD spindle would have all the bits written along a single ring or series of adjacent rings so that it literally takes less time for the moving head to travel over the surface of the disk to read the data. You can kind of think of it like a line of vehicles offloading at the airport, you have 3 busses of kids to offload, but only a couple vehicles can offload at the same time. If all 3 busses are right in line, it goes quicker than if they are all spaced out so that you have to wait between offloads. A heavily fragmented file on a rotational Hard disk drive is just like that, data pieces may be all over the disk, some on the inner rings, some outer, or some on the same ring but spaced far apart. Defragmentation literally moves smaller data chunks out from between larger data that would benefit from being closer and more compact to speed up the read and write process. Its why you need a certain amount of free space to defragment a disk.

With a solid state Drive, there aren’t any moving parts, just different memory cells. It is literally no faster to access any of the memory cells in the array than any other cell, so there is no benefit to having your data physically congruent like with a rotational HDD. The SSD can just read or write from any point in the array as fast as its base speed will let it, so it doesn’t care if the file is split all over. What a SSD really does care about though is the number of reads and writes of those cells over time, since they literally wear out. Defragmentation adds needless reads and writes to those cells, and does absolutely nothing for performance, so it actually adds a small but meaningful amount to accelerating the death of a SSD if you regularly defrag it. That being said, most SSD’s in home computers will never actually manage to wear out a cell in the drive before replacing it with a bigger newer faster one, but it is a concern.

So, TLDR: Spinning rotational hard drive spindles need data bits close together in a row to make it faster to read and write, SSD doesn’t care and excess reading and writing will actually kill the drive faster so Defrag = bad on a SSD.

Anonymous 0 Comments

Originally we used Hard Drives which you can think of as small little record players.

When you save your first few files they are laid down on the record like the first tracks of your LP. Eventually you might fill up your record, and decide to delete a few files to make room for your new game. So you pick a few files that you are no longer using and remove them. Unfortunately statistically these files that you removed are unlikely to be sequential tracks on the record. So when you install your new game, you end up putting part of the game on the first open track until that fills up, and then jump to the next open track until you have used up the space that you needed.

The issue now is that you can’t speed up the record player as it is always running at the max speed that it can. So as you load your game, you have to load each part of the file, and then skip to the next spot etc etc, which is much slower than just reading the whole thing as a single uninterrupted track.

Defragging is just the process of moving data around on the physical record to make as many fragmented tracks, sequential and unbroken again, hence defragmenting.

Modern computers are fast enough now that they can do this process either in the background or as you are accessing the data so it is not a monolithic event that you do once in a while. Also with SSDs you no longer have long seek and load times as data can be accessed from anywhere on the device at the same rate, so its not really a problem.

Anonymous 0 Comments

**What does defragmentation do**

Imagine you have 3 Programs installed, each having multiple files that all need to be accessed. Because the HDD writes the data on a platter physically, it can read things faster if they are close together. Perfect arrangement would be:

|AAAAABBBBBBCCCCCC..|

(for files belonging to program A B and C)
now if you install and uninstall programs regularly you end up in this configuration before installing program C:

|AAAAA….BBBBBB….|

installing program C would now lead to:

|AAAAACCCCBBBBBCC..|

In this configuration your HDD need to move its write-head/the physical disk more for loading all C-Files than in the optimal layout thus making the access slower.

Defragmentation reorders the “Fragmented” files that belong together to the optimal arrangement.

**Why its not needed with SSDs (and other flash memory)**

SSDs dont have any moving parts, accessing any part of the disk is basically the same speed. There would be no benefit in reordering the data.

An SSD does other things that are more relevant to it than HDDs. Eg. writing data to areas, that have the least number of writes to evenly distribute the wear and prolong the lifetime of the SSD, those things are (mostly) done automatically within the SSD though.

Anonymous 0 Comments

Imagine you have to put all the data I give you in crates, as efficiently as possible, and you NEVER get more crates to put things in.

Now imagine that the crates can ONLY hold papers in them up to the top of the crate.

Now I give you – over a course of years – huge amounts of folders and papers to put in those crates but all for different projects.

At first, you’ll want to put one set of folders in each crate, to keep them all together. That works fine. But eventually all the crates will have something in.

At some point, you’re going to have to split a folder and put half of it in one crate and half in another because you have no more empty crates and moving things between crates is slow and expensive (on old disks).

That means that when I ask for that particular folder back, you’re going to need to find two, maybe several, maybe HUNDREDS of crates in order to get all the folder pieces back together for it. That will take you far longer than just handing me a complete folder out of a single crate.

As time goes by, I might not need some folders any more and ask you to destroy them. But they might be spread out among several crates, so you have to delete all the parts. That leaves gaps in some crates at the beginning of your pile of crates, gaps in some crates at the end, and maybe full crates in between. Now when I give you another folder you have to split that folder into parts and put some in the first crates, and then run to the other end and put the rest in the last crates.

At some point, it begins to affect how fast you can find things, and it’s not logical or sensible. So you might decide one day to go through all the crates, put all the folders that are to do with the same project together, keep them all in crates that are next to each other, sort them all into order so you can find things easily again.

That’s defragging. Because of the technical limitations of machines and storage, you didn’t want to make the file reading/writing process any more complicated than necessary as it would slow the machine down when you were using it. So you did things “quickly” when you were given or asked for data even if that wasn’t sensible, and you never had time to “tidy up”. Which meant that eventually the mess built up and you HAD to defrag.

Modern OS simply do things more sensibly, because they have the processing and storage power to do so. And modern drives (SSD and NVMe) literally don’t care how far apart files are. They can get to a crate next to you just as quickly as a crate on the very end of the disk. Old storage that had spinning disks had to wait for the data to come around again, so accessing lots of different crates was slow and clunky. Modern “disks” aren’t even disks any more, and that’s no longer a factor. So no matter how “cluttered” or “disorganised” your storage is nowadays, there’s no point defragging as it won’t make the drive get files or folders any faster, and the OS is much better at not breaking up files like that in the first place if it can.

Anonymous 0 Comments

The short answer is that fragmentation can still happen, but certain techniques and technologies have made it such that it won’t impact you until your drive fills up.

Aside from the fact that we have SSDs which aren’t impacted by fragmentation, we also have newer filesystems that are designed to avoid fragmentation with various techniques that may not have previously been viable in years prior. For example, they’ll leave space between the files so that when the files are updated there is wiggle room, so that the new contents don’t need to be split unless the file has grown significantly, or they’ll move the file if there is another contiguous empty space large enough to accommodate, and/or will defragment “offline” when fragmentation reaches a certain threshold. Fragmentation still can happen, but typically isn’t a problem until your drive becomes so full that it’s impossible for any of these mitigations to be done (ie, there is no contiguous area that is empty for it to move the file into).