How does disk defragmentation work? - podcast episode cover

How does disk defragmentation work?

Jun 06, 20124 min
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

The term 'disk defrag' usually refers to the Windows utility known as the disk defragmenter. But what exactly is this thing, and how does it work? Tune in as Marshall Brain explains disk defragmentation in this podcast.

Learn more about your ad-choices at https://www.iheartpodcastnetwork.com

See omnystudio.com/listener for privacy information.

Transcript

Speaker 1

Welcome to Brainstuff from how stuff works dot com where smart Happens. Hi, I'm Marshall Brain with today's question, how does disk defrag work? The word disk defrag is typically used to refer to the Microsoft Windows utility called the disk defragment or. It's designed to solve a problem that occurs because of the way hard disk store data. If you've read the article how hard disks work, then you know three key facts about hard disks. First, hard disk

store data in chunks called sectors. If you imagine the surface of the disc divided into rings like the rings of a tree, and then imagine dividing each ring into pie slices, a sector is one pie slice on one ring. Each sector holds a fixed amount of data, like five and twelve bytes. The hard disk has a small arm that can move from ring to ring on the surface of the disk to reach a particular sector. The hard disc moves the arm to the right ring, and then

it waits for the sector to spin into position. Third, hard discs are slow in computer terms compared to the speed of the processor in its memory. The time it takes for the arm to move and for a sector to spin into place is an eon. Because of fact number three, you want to minimize ARM movement as much as possible, and you want data stored in sequential segments on the disc. So let's imagine that you install a

new application on an empty hard disk. Because the disk is empty, the computer can store the files of the application into sequential sectors on sequential rings. This is an efficient way to place data on a hard disk. As you use the disc. However, this efficient technique becomes harder for a disk. What happens is that the disc fills up and then you erase files to reclaim space. Those files that you delete are scattered all over the surface

of the disk. When you load a new application or a large file onto the disc, it ends up being stored in hundreds or thousands of these scattered pockets of space. Now, when the computer tries to load the scattered pieces the discs ARM has to move all over the surface and it takes forever. The idea behind the disc defragment or is to move all the files around so that every file is stored on sequential sectors on sequential rings on

the disc. In addition, a good disk defragment or may also try to optimize things even more, for example, by placing all applications close to the operating system on the disc to minimize movement when an application loads. When done well on older discs, defragmenting can significantly increase the speed of file loading. On a new disc that's never filled up or had any significant number of file deletions, it will have almost no effect because everything is stored sequentially

all ready. As you might imagine, the process of individually picking up and moving thousands of files on a relatively slow hard disk is not a quick process. It normally takes hours for the defragment or to run properly, ensure that you have no other applications running, and then run the defragment or sometime late in the evening before you plan to go to sleep, or before you go out to dinner or something, so it has a big chunk

of time to do its job. For more on this and thousands of other topics, is it how staff works dot com

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android