What does a defrag do really? Does it put the files that execute in sequence closer together?
|
feedback
|
|
Actually it puts all the different parts of ONE file together, so if that particular file is needed, the harddisk doesn't have to move its arm (which is the real performance-breaker here) that much to gather all the bits of the file. ==> hence, better perfomance (although it's not always noticable). Note that this only applies to hard disks with platters and movable parts. For SSD's this is no problem, as it takes the same time to fetch any data independent from where it's located on the disk. Defragging SSD's is actually a bad idea as they have a limited number of times they can be written to on each 'sector' (I don't think 'sector' is the right term here, but you know what I mean I hope). | |||||||
feedback
|
|
It depends on the defragmentation program. At a minimum it will aim to put the clusters for a single file or directory into a contiguous sequence, providing that there is space available to do this. It may also sequence files and directories according to usage profiles, if it collects these. It may not be able to move some files (certain open and system files typically). The reason for defragmenting is that random reads are considerably slower than reading a continuous sequence of blocks/clusters off the disk. However, not all file systems or operating systems have the same requirements for (separate) defragmentation programs. | |||
feedback
|
|
Defragging can do two things:
Also, I'd like to add something about defragging SSD's:
source: Inside the Box Lenovo blog | |||||||||
feedback
|
|
Without getting into too much technical mumbo jumbo, it makes your hard drive look less like swiss cheese. More details and an animated image here: http://en.wikipedia.org/wiki/Defrag | |||
|
feedback
|
|
Defragmenting a drive can do a couple of different things. Typically the defrag process looks for files which have been broken up into chunks for whatever reason. Many cases this occurs from reading and writing to a drive over time. The defrag program assembles all of the fragments and then find a spot on the disk where that entire file will fit. In some cases it ends up being a but of a shell game to move things around making places for all the largest files. Now something to be said about putting all of these files together concerns the typical "seek" time of the Read/Write head on the disk. Every time you have to move the read/write head somewhere else on the disk you typically incur a delay of a number of milliseconds. When reading a file that is all in one location, the read/write head does not have to move very far at all to continue reading the file. This is much faster than going to another spot entirely on the disk. In some cases defragmentation can be done to optimize the operating system by placing the system files accessed most frequently closer to the "landing zone" for the read/right head when it is not performing any reads/writes. This can in many cases speed things up quite a bit. I have not seen a defrag tool out there which has the ability to keep statistics on the number of times a file has been accessed, but if there was, it could stack the disk first with the most frequently accessed files. | |||
|
feedback
|
