Disk Defragmentation Explained - GoTechTalk


Friday, June 22, 2018

Disk Defragmentation Explained

Disk Defragmentation Explained
Defragmenting your hard drive it's a lot like changing the oil in your sedan, something everyone has to do regularly but is unexcited inconvenient and therefore very easy to put off at least, with oil though most people understand the purpose but Windows doesn't really tell you much about what defragmentation, actually is other than some unclear statement about how it makes your drives faster.

So what exactly is it the reason that disk defragmentation is a thing because of the way a mechanical hard drive stores data, think of a hard drive is a really long sheet of paper, when you first install your operating system and put things on it everything is stored in basically a straight line starting at the top and working your way down but over time of course you'll start changing or deleting files and adding new ones so suppose one of the files you delete is located closer to the top of the sheet of paper so you don't want to play buying sweeper anymore now you have some free space there that's right in the middle of a bunch of other data instead of being at the very end like it was when you first started using your hard drive so what happens to this free space, well suppose you put another relatively large file on your hard drive like maybe a filmed speech or whatever you're into, what your computer will do is it'll place part of that large file in that free space until it's filled up and then place the rest of the file elsewhere on your hard drive this is called file fragmentation and it can seriously slow performance because in a mechanical Drive the platters have to physically spin to allow the drives head to access the files and if a file is broken up into several parts scattered all over your disk it's naturally going to take longer to bring up whatever it is you're looking for.

Defragmentation reverses these effects by doing two things.

1. It reassembles any files that have been broken into little pieces and places the files in just one physical location on your disk resulting in faster access.

2. It rearranges most of the free space on your drive into one large continuous chunk so that your PC won't try to fragment, new files or information and divvy them up into little cubbyholes of free space like we did when we were in kindergarten.

Now you might be asking what if I have an SSD I heard you're not supposed to defragment those you would be correct defragmentation doesn't result in the same performance benefits for SSDs and the reason for this is that since SSDs don't have any moving parts, the PC can access all the data at roughly the same speed regardless of which chip of the SSD is actually holding a particular chunk of a file in fact trying to defragment an SSD can do more harm than good.

The cells that actually contain data on an SSD can only be written to so many times until they wear out and become completely useless and defragmentation uses up a lot of those write cycles playing digital 15 puzzle, if you're running Windows 7 or newer though don't fret the OS actually won't even let you defragment any connected SSDs and will instead give you an option to optimize the SSD what this will do instead of defragging is send something called a trim command unlike mechanical hard drives on which the data can simply be overwritten,  the cells on SSDs have to be erased before new data can be written to them or else you can seriously lose performance over time trimmed erases cells with old data that hasn't actually been physically removed from the drive yet, by the way ahead of time so the SSD can write new information to those cells much more quickly in the future trim is usually handled automatically by windows, so you don't need to do much to keep it running other than running a trim checker to ensure it actually is working but if you have a mechanical hard drive make sure defragmentation is running periodically.

Alright, guys, that's the end of the blog, thanks for reading the whole way through if you enjoyed this blog please share it with someone who would be interested and leave a comment, Thanks for reading guys.

No comments:

Post a Comment