What is Disk Fragmentation on Windows and how does it optimize your hard disk?

1.11K views

What is Disk Fragmentation on Windows and how does it optimize your hard disk?

In: 57

52 Answers

Anonymous 0 Comments

Imagine a basement.
Everytime you need to store something you just drop it where you see a free space. everything is mixed. The Christmas decorations are over there, the Christmas tree is behind the door. The tires are here and the car toolbox is somewhere overthere.

Defragmenting is gathering all relevent item together. All decorations on the decorations shelf. most often used are moved neer the entrance. It is easier to sort everything if you still have some free room to navigate.

Anonymous 0 Comments

If you think fragmentation can’t occur, consider a programmer who sets out to fragment files with multiple threads, do you think his actions will be unsuccessful?

Fragger.exe does a good job of burning through the write cycles of ssd and setting up fragmentation.

If your 50gb of 20byte files are “randomly” smeared over a ssd the devices storage is fragmented meaning many more read cycles are needed to construct a stream of data to feed back to the OS as it’s not contiguous even if you have 10m IOPS you will see performance drop off and that’s the manifestation of fragmentation it slows down.

So ssd do suffer with fragmentation- but to a lesser degree.

A real world example is setting up a nas to torrent if you have a scratch disk fragmentation is quickly noticed on it.

Using a ssd will speed things up hugely but the ssd will wear out.

Using system memory, as the scratch area will speed things up even more and save the ssd.

Anonymous 0 Comments

Imagine a basement.
Everytime you need to store something you just drop it where you see a free space. everything is mixed. The Christmas decorations are over there, the Christmas tree is behind the door. The tires are here and the car toolbox is somewhere overthere.

Defragmenting is gathering all relevent item together. All decorations on the decorations shelf. most often used are moved neer the entrance. It is easier to sort everything if you still have some free room to navigate.

Anonymous 0 Comments

A HDD is essentially a spinning metal platter and a magnetic arm that reads or writes data to the platter. You can think of it similar to a record (the platter) and needle (the arm) in a record player.

When you write data to the HDD, the platter’s surface is essentially what the data is written to. If you think of sectors as a physical dimension, then only a certain amount of data can be written to a small section of the platter.

When you delete stuff from your HDD, you essentially free up areas to be rewritten. Going back to the physical dimensions, this means there’s going to be “holes” or areas where there’s no real data. Depending on how the data gets written, it might fill some of those holes with new data. If the newer data is too big to fit in those holes, it will split part of the newer data with those locations and then place the excess in a different location.

For the most part that doesn’t seem like too big of a deal, and it’s not really when you consider the rest of the data might just be a few sectors over. However when the distance between sectors get too far apart or the data is spread throughout multiple spaced sectors, it takes more time for you to read the data. This is because the platter has to spin so that the arm can read part of the data, spin again to the next location and again until it reads all of the file.

Essentially disk defragging takes the data spread apart and rearranges them so that they’re next to each other in continuous sectors. You can think of the process similar to a bus route. If each pick up location was the next block from the last, you’d get to the next location quicker than if the next stop was two blocks down and then the last stop was 5 blocks.

Anonymous 0 Comments

If you think fragmentation can’t occur, consider a programmer who sets out to fragment files with multiple threads, do you think his actions will be unsuccessful?

Fragger.exe does a good job of burning through the write cycles of ssd and setting up fragmentation.

If your 50gb of 20byte files are “randomly” smeared over a ssd the devices storage is fragmented meaning many more read cycles are needed to construct a stream of data to feed back to the OS as it’s not contiguous even if you have 10m IOPS you will see performance drop off and that’s the manifestation of fragmentation it slows down.

So ssd do suffer with fragmentation- but to a lesser degree.

A real world example is setting up a nas to torrent if you have a scratch disk fragmentation is quickly noticed on it.

Using a ssd will speed things up hugely but the ssd will wear out.

Using system memory, as the scratch area will speed things up even more and save the ssd.

Anonymous 0 Comments

A HDD is essentially a spinning metal platter and a magnetic arm that reads or writes data to the platter. You can think of it similar to a record (the platter) and needle (the arm) in a record player.

When you write data to the HDD, the platter’s surface is essentially what the data is written to. If you think of sectors as a physical dimension, then only a certain amount of data can be written to a small section of the platter.

When you delete stuff from your HDD, you essentially free up areas to be rewritten. Going back to the physical dimensions, this means there’s going to be “holes” or areas where there’s no real data. Depending on how the data gets written, it might fill some of those holes with new data. If the newer data is too big to fit in those holes, it will split part of the newer data with those locations and then place the excess in a different location.

For the most part that doesn’t seem like too big of a deal, and it’s not really when you consider the rest of the data might just be a few sectors over. However when the distance between sectors get too far apart or the data is spread throughout multiple spaced sectors, it takes more time for you to read the data. This is because the platter has to spin so that the arm can read part of the data, spin again to the next location and again until it reads all of the file.

Essentially disk defragging takes the data spread apart and rearranges them so that they’re next to each other in continuous sectors. You can think of the process similar to a bus route. If each pick up location was the next block from the last, you’d get to the next location quicker than if the next stop was two blocks down and then the last stop was 5 blocks.

Anonymous 0 Comments

If you have a hundred Legos on the table, and I asked you to hand me all the red ones, it’ll be a lot faster to get all the red ones if they’re already sorted by color. If they’re not sorted by color, it takes more time to work around all the other other colors to find all the red ones and you have to pick them up one by one instead of grabbing them by the handful. A fragmented disk is like having the Legos on the table all willy nilly, but disk defragmentation sorts them by color for you so they’re easier for you to find.

Anonymous 0 Comments

If you have a hundred Legos on the table, and I asked you to hand me all the red ones, it’ll be a lot faster to get all the red ones if they’re already sorted by color. If they’re not sorted by color, it takes more time to work around all the other other colors to find all the red ones and you have to pick them up one by one instead of grabbing them by the handful. A fragmented disk is like having the Legos on the table all willy nilly, but disk defragmentation sorts them by color for you so they’re easier for you to find.

Anonymous 0 Comments

Many data storage mediums historically involve the movement of a head…think of it like a record player: if you want to change songs, it takes time to move the needle to a new location

Hard drives with a rotating disk and a movable head are similar. They work most efficiently if all the data in a file (track on a record) are in an consecutive sequence.

Disk fragmentation is when this breaks down. Imagine a record that is full of music, but bits of songs are jumbled up. You would need to move the needle around a lot to keep the same song playing.

Defragmentation fixes this; the data (tracks) are reorganized such that related data is on the same track. This makes it unnecessary for the head to move around when reading data.

Anonymous 0 Comments

Many data storage mediums historically involve the movement of a head…think of it like a record player: if you want to change songs, it takes time to move the needle to a new location

Hard drives with a rotating disk and a movable head are similar. They work most efficiently if all the data in a file (track on a record) are in an consecutive sequence.

Disk fragmentation is when this breaks down. Imagine a record that is full of music, but bits of songs are jumbled up. You would need to move the needle around a lot to keep the same song playing.

Defragmentation fixes this; the data (tracks) are reorganized such that related data is on the same track. This makes it unnecessary for the head to move around when reading data.