Speaker 1: Welcome to Brainstuff from how stuff works dot com where
Speaker 1: smart Happens. Hi, I'm Marshall Brain with today's question, how
Speaker 1: does disk defrag work? The word disk defrag is typically
Speaker 1: used to refer to the Microsoft Windows utility called the
Speaker 1: disk defragment or. It's designed to solve a problem that
Speaker 1: occurs because of the way hard disk store data. If
Speaker 1: you've read the article how hard disks work, then you
Speaker 1: know three key facts about hard disks. First, hard disk
Speaker 1: store data in chunks called sectors. If you imagine the
Speaker 1: surface of the disc divided into rings like the rings
Speaker 1: of a tree, and then imagine dividing each ring into
Speaker 1: pie slices, a sector is one pie slice on one ring.
Speaker 1: Each sector holds a fixed amount of data, like five
Speaker 1: and twelve bytes. The hard disk has a small arm
Speaker 1: that can move from ring to ring on the surface
Speaker 1: of the disk to reach a particular sector. The hard
Speaker 1: disc moves the arm to the right ring, and then
Speaker 1: it waits for the sector to spin into position. Third,
Speaker 1: hard discs are slow in computer terms compared to the
Speaker 1: speed of the processor in its memory. The time it
Speaker 1: takes for the arm to move and for a sector
Speaker 1: to spin into place is an eon. Because of fact
Speaker 1: number three, you want to minimize ARM movement as much
Speaker 1: as possible, and you want data stored in sequential segments
Speaker 1: on the disc. So let's imagine that you install a
Speaker 1: new application on an empty hard disk. Because the disk
Speaker 1: is empty, the computer can store the files of the
Speaker 1: application into sequential sectors on sequential rings. This is an
Speaker 1: efficient way to place data on a hard disk. As
Speaker 1: you use the disc. However, this efficient technique becomes harder
Speaker 1: for a disk. What happens is that the disc fills
Speaker 1: up and then you erase files to reclaim space. Those
Speaker 1: files that you delete are scattered all over the surface
Speaker 1: of the disk. When you load a new application or
Speaker 1: a large file onto the disc, it ends up being
Speaker 1: stored in hundreds or thousands of these scattered pockets of space. Now,
Speaker 1: when the computer tries to load the scattered pieces the
Speaker 1: discs ARM has to move all over the surface and
Speaker 1: it takes forever. The idea behind the disc defragment or
Speaker 1: is to move all the files around so that every
Speaker 1: file is stored on sequential sectors on sequential rings on
Speaker 1: the disc. In addition, a good disk defragment or may
Speaker 1: also try to optimize things even more, for example, by
Speaker 1: placing all applications close to the operating system on the
Speaker 1: disc to minimize movement when an application loads. When done
Speaker 1: well on older discs, defragmenting can significantly increase the speed
Speaker 1: of file loading. On a new disc that's never filled
Speaker 1: up or had any significant number of file deletions, it
Speaker 1: will have almost no effect because everything is stored sequentially
Speaker 1: all ready. As you might imagine, the process of individually
Speaker 1: picking up and moving thousands of files on a relatively
Speaker 1: slow hard disk is not a quick process. It normally
Speaker 1: takes hours for the defragment or to run properly, ensure
Speaker 1: that you have no other applications running, and then run
Speaker 1: the defragment or sometime late in the evening before you
Speaker 1: plan to go to sleep, or before you go out
Speaker 1: to dinner or something, so it has a big chunk
Speaker 1: of time to do its job. For more on this
Speaker 1: and thousands of other topics, is it how staff works
Speaker 1: dot com