Defragmentation is an optimization technique for sector allocation on hard disks. Defragmentation is about rearranging fragmented data sets stored on different sectors of a hard disk in such a way that the number of fragments is reduced and the remaining fragments are stored in adjacent sectors if possible. If possible, the entire data set should be stored in one fragment. The advantage of defragmenting is the shorter access times for longer data sets.
The defragmentation software is included in the operating system and runs periodically after a certain time or automatically after being called up.