What is Defragmentation? (Explained)

4
30
What is Defragmentation

What is Defragmentation?

Defragmentation defines the process of rearranging the data stored on a hard drive. In simple words, this is the process that ensures that all data blocks of a file are stored in one place, and as a whole.

From a technical point of view, defragmentation is the process by which the fragmented or noncontiguous data of a file division is reorganized and is stored on the hard disk, either in one single file or in fewer fragments.

KEY TAKEAWAYS

  • Defragmentation refers to reorganizing the stored data on a hard drive to prevent file defragmentation and help in increasing the proficiency of data access. It also maintains the rhythm of the system.
  • The overall speed of the computer is also increased due to defragmentation because it takes less time to access and open files and programs due to the organized data on the hard drive.
  • A hard drive can be defragged by using a defragmentation utility of the operating system, such as Defrag in Microsoft Windows. It can also be done by using any good hard drive cleaning utility program.
  • Potential fragmentation of storage media can be reduced by partitioning databases and specific programs such as Internet Explorer, and by the users optimizing operating system storage by creating logical hard drives.
  • Defragmentation is a common process for the hard drives especially because the SSDs typically do not need it due to the TRIM operation which eliminates the need for a standard defragmentation.

Understanding Defragmentation

What is Defragmentation

The process of rearranging the fragments of data in a file stored on a hard disk is called defragmentation.

This process helps the computer to access data much faster since it can now use the storage much more efficiently than before.

Defragmentation of a storage device may be done automatically and periodically by a few operating systems.

However, with most of the operating systems, the user is needed to use a specific kind of utility program periodically for the same.

Defragmentation, or consolidating the fragmented files on the hard drive of a user, occurs when files become split or patchy while writing data to the disk. There are lots of reasons for a file to get fragmented, such as:

These fragmented pieces cannot be stored in one single place usually due to the lack of adequate contiguous space on the drive to hold the whole file.

In such a situation, the storage algorithm breaks the data apart and fits it into the spaces available.

Such a modified saving process for a file may have one part of it in one part of the hard drive and the other part in another, which is different from the original file.

If there are additional modifications made in the file, then these parts are stored in a number of locations.

This gradually fragments the file as well as the hard drive, resulting in the slow speed of the computer since it needs to search the relevant data of a file in a number of locations to open a file.

With defragmentation, the data blocks on the hard disk are moved around in order to bring all the separate parts of the file together.

What is Defragmentation

Defragmentation Tools

There are different defragmentation tools introduced in the operating systems to remove this issue.

Different types and versions of operating systems may come with different types of defragmenters in them. For example:

  • Windows 98 has a defragmenter system tool built in the Tools menu of the system for the users to run occasionally.
  • A light yet efficient version of Diskeeper is installed in Windows 2000 to reorganize the data on the hard drive.
  • On the other hand, the Windows XP version comes with the Disk Defragmenter utility tool built into it.
Read Also:  PCIe and SATA SSD for Gaming: 10 Differences

The Windows NT does not come with such utility because the New Technology File System (NTFS) of it is intended to minimize fragmentation. Still, users of NT often find it necessary and use defragmenters of different vendors for that matter.

Also, the UNIX and Linux-based computers do not come with such tools due to their different mechanisms to store data, even though the same hardware is used.

Other users, especially the corporate users, use a full-function Diskeeper or some other similar defragmentation utility program to manage their data storage and increase its performance and efficiency.

Some other defrag tools are as follows:

  • There is an internal reallocator in BSD UFS, especially FreeBSD, that controls fragmentation by reducing it right at the moment when the data is written on the disk.
  • Btrfs comes with an automatic and online defragmentation tool.
  • VxFS comes with the fsadm utility that includes defragmenting operations.
  • On IBM operating systems, JFS has the defragfs utility.
  • HFS Plus comes with several optimizations in the allocation algorithms for defragging files.
  • WAFL in NetApp’s ONTAP 7.2 operating system comes with the reallocate command to defrag large files.
  • XFS is equipped with an online xfs_fsr defragmentation utility.
  • SFS can start and stop defragmentation almost instantaneously with its defragmentation feature.
  • The ADFS file system used by early Acorn computers and RISC OS controls file fragmentation without needing manual defragmentation.

Using Defragmentation

In a Windows 8 and Windows 10 computer systems, the steps to follow to optimize the drive and help the computer to boot up faster and run smoothly are:

  • Selecting the search bar on the taskbar
  • Typing defrag
  • Selecting Defragment and Optimize Drives
  • Selecting the disk drive to optimize
  • Clicking on the Optimize button

In Windows 7 computer systems, the process are as follows:

  • Click on the Start orb
  • Type defrag
  • Select Disk Defragmenter
  • Click Defragment disk

The Importance of Defragmentation

The major significance of defragging a computer’s storage is to improve its overall speed and performance level.

It will take a long time to start functioning once you turn on the system, and sometimes, if the hard disk is excessively fragmented, it may even result in the freezing of the computer or not starting at all.

Hard disk defragmentation also has some other specific importance apart from the above, such as:

  • It helps in reorganizing all the files on the hard disk of the computer to create a lot of free space necessary for it to perform better. The process also helps in administering several other operations of the computer.
  • It removes all the damaged files from the hard disk drive that consume a lot of space. A computer system needs enough free space to function properly. Several needless files can affect the performance of the hard disk.
  • Since the process scans all the files, disk defragmentation therefore indirectly helps in detecting any viruses and spyware on the hard disk, along with all possible errors that may be slowing down your computer while opening applications.
  • Apart from boosting the performance of the computer system, this process is also very effective in recognizing the files without losing or deleting any crucial documents.
  • It also extends the life of the hard drive by reducing wear and tear due to the parts having to travel less distance to fetch data.

Most importantly, it will offer you the pleasure of working on a fast computer and finish all your workload on time to meet deadlines with the chances of the system hanging, freezing, or crashing frequently.

So, make it a point to defrag your hard drive on a regular basis, especially if you use your computer system for an extended period of time in a day.

Read Also:  What is NTFS (New Technology File System)? (Explained)

However, it is an HDD that will need defragging because the SSDs know which data blocks are not necessary and will not be reused.

The TRIM operation tells it which particular data blocks are not required and will be reused and therefore it does not need traditional defragmentation to be done.

This is the main reason why the performance of an SSD is better than the HDD because it does not need to erase the data block from a location first to create room and then write fresh data.

How Does It Work?

Typically, the working process of disk defragmentation involves taking all the separate pieces of a file together and storing them all in one single place.

In addition to that, the process also includes partitioning and optimization where the users create logical hard drives for operating systems.

The defragmentation process can be automatic or manual. Typically, the entire process involves the following steps:

  • When a file is saved on the hard disk by a program, it is placed on an empty space on it.
  • When any changes to the same file are made and are saved, it usually gets saved in another empty location away from the previous one.
  • Every time such changes are made, these are saved in any available and different empty space.
  • These separated or fragmented spaces take longer to access by the program making the system slower and slower.
  • Disk defragmentation comes to the rescue and brings all these pieces together without changing the contents or what you see on the screen.

Therefore, have your disk defragged quite regularly before the fragments are saved farther apart.

However, at this point you should note that defragmentation will only happen when one or more of the following rules apply:

  • There must be at least 15% of free space on the hard drive for the disk defragmenter tool to function properly.
  • If any specific partition is marked dirty, it will not be defragged. This is because it is highly likely that the data blocks in this partition are corrupted.
  • You cannot run more than one instance of disk defragmenter at one time.
  • You can only defrag the local drives.
  • You should close all running programs and applications on your computer system before defragging the hard disk.

When Should You Defrag Your Hard Drive?

As the rule of thumb, you should defrag the hard drive of your computer when fragmentation in it reaches near to or more than 10%.

However, in specific types of operating systems such as Windows 7, Windows 8, and Windows 10, you can even schedule it to happen as regularly as well.

There are a few specific signs as well that will tell you when your computer needs defragmenting. You should also pay close attention to them. These are:

  • When the files or a new environment of a game take a much longer time than usual to load
  • When the computer system as a whole runs very slowly
  • When you hear a constant whirring sound when the hard drive of your computer is in action

As a general rule, if you are an average computer user and use it for occasional email, games, web browsing and other basic computing tasks, you should defrag your computer at least once in a month.

On the other hand, if you are a heavy user and use your system for eight hours or more every day, you should defrag your hard disk at least twice in a month.

Also, whenever you feel that your computer is slow, you can defrag your hard disk. This is often the primary cause of a slow-running computer system.

How Many Passes are Required in Defragmentation?

Typically, it may take anywhere between one or a couple and 40 passes or more to complete defragmentation. However, there is no universal or set standard for it.

Read Also:  What is Solid State Drive (SSD)? Function, Pros, Cons & More

Moreover, if you are using a third-party tool, you can even set the number of passes required.

Ideally, the number of passes required in defragmentation depends on several factors such as:

  • On the number of errors existing
  • The SMART status
  • The size of the hard disk itself
  • The frequency of defragmentation or the time you last defragged it

Advantages

  • It reduces fragmentation of the file system.
  • It increases the efficiency of data retrieval.
  • It improves the overall performance of the computer system.
  • It cleans the storage devices.
  • It ensures that the free space on the hard disk is all in one place.
  • It offers additional storage capacity.
  • It ensures that the programs are in one place.
  • It allows programs and applications to run more efficiently and faster.
  • It enhances security since the existence of viruses and spyware is also checked.
  • It points out the bad sectors and errors in the storage that may damage data when stored there.
  • It helps to analyze and see how much space on your disk is being used.
  • It saves money in the long run because it extends the life of the hard disk with enhanced security.

Disadvantages

  • There is a chance of file corruption if the computer loses power, which may not be recovered.
  • In case of a power loss during the process, only a part of files may be erased or rewritten incompletely.
  • A corrupted program file may stop working completely.
  • It is a very time-consuming process and the computer cannot be used for hours at times.
  • Inactive computers in a business or other productive environments result in reduced personal productivity.
  • Modern hard drives typically have very little positive effect from defragmentation since they are designed to work very efficiently.

Questions & Answers:

Does Defragmentation Improve Performance?

Yes, the performance level of the computer system is significantly improved due to defragmentation. This will bring all the disjointed pieces of a file together in one place and reduce the access time.

Does Defragmenting Delete Anything?

No, usually defragmentation does not delete files or anything. However, there may be a few specific types of software maintenance programs built by some third-party companies that may include defragmentation as a part of them.

These particular programs may delete the duplicate and temporary files.

How Long Does It Take to Defrag?

Typically, there is no set time limit for a defragmentation process to complete. It may take ten minutes or a couple of hours, depending on the volume to be defragged. It mainly depends on the number and size of the files.

Therefore, it is wise to use this tool when you know that you will not need to use your computer for quite some time.

Conclusion

Fragmentation can create a lot of problems of different types and affect the functioning of the hard drive and the computer system as a whole, depending on the operating system being used.

Defragmentation of the hard drives by using different tools available helps in reducing this problem by a significant margin.

About Puja Chatterjee

AvatarPuja Chatterjee, a distinguished technical writer, boasts an extensive and nuanced understanding of computer technology. She is an esteemed graduate of the Bengal Institute of Management Studies (BIMS), where she honed her skills and knowledge in the tech domain. Over the span of more than 12 years, Puja has developed a deep expertise that encompasses not only technology writing, where she articulates complex technical concepts with clarity and precision, but also in the realm of client relationship management. Her experience in this area is characterized by her ability to effectively communicate and engage with clients, ensuring their needs are met with the highest level of professionalism and understanding of their technical requirements. Puja's career is marked by a commitment to excellence in both written communication within the tech industry and fostering strong, productive relationships with clients.

Previous articleWhat is DBAN (Darik’s Boot and Nuke)? (Explained)
Next articleWhat is Disc Cloning? (Explained)
Puja Chatterjee
Puja Chatterjee, a distinguished technical writer, boasts an extensive and nuanced understanding of computer technology. She is an esteemed graduate of the Bengal Institute of Management Studies (BIMS), where she honed her skills and knowledge in the tech domain. Over the span of more than 12 years, Puja has developed a deep expertise that encompasses not only technology writing, where she articulates complex technical concepts with clarity and precision, but also in the realm of client relationship management. Her experience in this area is characterized by her ability to effectively communicate and engage with clients, ensuring their needs are met with the highest level of professionalism and understanding of their technical requirements. Puja's career is marked by a commitment to excellence in both written communication within the tech industry and fostering strong, productive relationships with clients.
4 Comments
Oldest
Newest
Inline Feedbacks
View all comments