What is Disk Defragmentation & Why is it Needed?

Defrag, short for Defragging or even disk defragmentation, refers to the maintenance task that shifts the position or the layout of the files on the hard drive. For faster access, drives must get defragmented regularly.

You can defrag drives manually, or you can change the settings enabling your OS to perform it periodically for you.


Before we try to rearrange the data using defrag tools, let’s first understand how data gets arranged.

Structure of Hard Drives

All the data in the computer gets stored inside one or more disks located inside a hard drive called platters. These disks are made up of aluminum or glass and coated with a magnetic media.

These platters begin to rotate every time the computer is turned on. The rotations called RPM (Rotation per Minute) differ from one hard drive to another.

Each hard drive also differs on the number of platters depending on its capacity, the manufacturer and the size of the hard drive.

But almost all modern hard drives have two or more platters unless if the hard drive is an SSD (Solid State Drive). SSD has no platters.

How is the data stored?

Each platter has billions of tiny magnetic regions. Each of these regions is used to represent binary data. It has a value 1 if it is magnetized or 0 if it is demagnetized.

Magnetism is used for storage of data in computers because they can store the value even if the power is turned off.

The most important thing about storing something is in knowing where it is stored and how to retrieve it. Similarly in hard drives data is stored in an orderly manner.

Data contains blocks of information. These blocks of data get stored as bits in concentric circles called tracks.

These tracks get further divided into many sectors. The hard drive also stores a map of the sectors, called file-allocation table, denoting which sectors are free and which sectors have data in them.

Every time data gets written into a drive, the system first checks in with the map and then writes the data into the available space.

Why does data get fragmented?

While the data is stored in an orderly manner primarily, it is possible that the blocks of data get distributed when they get read and restored or rewritten into the memory.

Moreover, the drive can become more fragmented and a bit more unstable every single time a user installs a program, saves a file or deletes some information.

As time goes on, excessive fragmentation causes the laptop or a computer to slow down due to the multiple checks needed to retrieve a single piece of information.

All operating systems suffer from some level of fragmentation. But different OS has different file systems.

Linux and MacOS’s file system handle file storage differently. Instead of placing the information close to one another, they are scattered around in the memory.

This type of storage allows the files to grow in size. If and when fragmentation occurs the files are moved around to make space.

Windows works differently from MacOS and Linux. In older file systems like FAT and FAT32, there was no in-built fragmentation protection. These file systems required periodic manual defragmentation.

But Windows uses the new file system NFTS on almost all the drivers by default which has some in-built protection against fragmentation.

In addition to hard drives, flash drives can also get fragmented. These too can be defragmented. But most people nowadays don’t bother with defragmentation of the discs because it is painfully slow and Windows automatically deals with it.

Like Windows 8 and Windows 7, Windows 10 defragments the hard drives every once in a while (default one week). But this process is sometimes inconsistent.

So if you want to double check the process, or if you notice a lag in the time taken for files to load, it is always best to defrag at least once every month.

Defragmenting a drive in Windows 10

Lets find out how to defragement a drive in windows 10.

Using Search

  1. Open Defragment and Optimize Drivers by searching for optimize or defrag in the taskbar.

defragmenting in windows 10a

  1. Optimize drivers dialog box opens. Select the driver you want to defragment and click on Analyze. If the drive is an SSD, this option is disabled, i.e., it is grayed out.

defragmenting in windows 10b

3. The result of the analysis gets displayed in % on the side.

4. Click on optimize to defragment your driver.

defragmenting in windows 10c

Using Properties

  1. Open-File Explorer and go to This PC.
  2. Right click on the drive you wish to defragment and click on Properties.
  3. Navigate to the Tools tab and click on Optimize to defragment the drive.

defragmenting in windows 10d

4. Follow steps 2 to 4 given above.

Defragmenting a drive in Windows 8 or Windows 7

  1. Open-My Computer.
  2. Right click on the drive you wish to defragment and click on Properties.
  3. In the properties dialog box, navigate to the Tools tab.

defragmenting in windows 7-8a
4. Click on the Defragment Now button. The Disk Defragment dialog box opens.
5. Click on Analyze to check the level of fragmentation rather than waste time defragmenting a defragmented drive.

defragmenting in windows 7-8b
6. Click on Defragment Now to defragment the drive.

defragmenting in windows 7-8c

If this is the first time defragmenting the drive, then you can see some considerable changes, but if this isn’t the first time defragmenting it, you can’t visibly see the changes.

Defragmenting a drive in Mac

As mentioned earlier Mac has a different file system which doesn’t need defragmentation. Nowadays Mac uses Solid State Drivers, and they don’t need to be defragmented just like SSDs in windows.

Even with the older Mac fragmentation wasn’t a problem because of how files are stored.

When a file gets stored on to the memory, it leaves space for that file to expand and grow rather than storing two files close together.

Mac can also detect if the data is in the wrong place when opened, and it automatically moves the file to the correct position.

What if you still want to defragment it anyway?

Though advised against it, you can still defragment a drive for the following reasons.

  • It doesn’t improve performance as much as regular hard drives.
  • It is probably unnecessary, and if your system is slow, it is because of other reasons.
  • It isn’t supported, and there is not much software that can be used to defragment the drives.
  • It can interfere with the in-built defragmentation thus making the drive slower.

Things to consider while defragmenting

When you defragment your drive, there are few things to consider. They are,

  • You need not defragment an SSD.
  • Avoid defragmenting media like flash drives or media card. Only a limited number of writes is available to these drives. This number is usually so high, but when we reach that number, the hard drive becomes useless. So its best not to waste those writes by defragmenting.
  • Defragmenting Optical drives and network drives isn’t necessary.
  • Even if the fragmentation is 0%, Windows still finds something to defragment.
  • Even after a drive is defragmented some files remain fragmented. It is crucial to not obsess over them.

Over to you on defragmentation

In short defrag rearranges blocks of data to provide faster access. Defragmentation is something everyone overlooks. We’ve never bothered to check for fragmentation in our data even if the system is slow.

Or we might have considered defragmenting drive as hard work which required specialized tools.

But in reality, defragmentation is simple and should be done regularly to maintain the health of the drives. You can defrag drives manually, or you can change the settings enabling your OS to perform it periodically for you.


You May Also Like

How Does the URL (Uniform Resource Locator) Address Work?

Uniform Resource Locator shortened as URL is used to identify the location of a file or a resource on the internet. We use URLs to open websites, images, videos, applications, and other programs that are hosted on the internet.

Best Web Browsers of 2020 – With Pros & Cons

Web Browsers are the means to interact on the internet. Having the right browser boosts the overall experience with the internet.

How to Clear Cache from Different Browsers in Windows and Mac

Cache, aka web cache is a temporary storage location in the computer for storing the files that are downloaded by the browser. These files tend to take a lot of space in memory and are generally unnecessary.

Internet vs Web (WWW) – Do You Know the Difference?

The internet offers a variety of services including web or world wide web. The web is a way to access information over the internet.

URL Shortener – Advantages and How Can You Do It?

URL shortening is a mechanism of translating a typically long URL into a shorter alternative that redirects to the same original URL.

More Articles Like This