In computers, why do some files, even if they are the same size, take longer to be moved or deleted than others?

509 views

I noticed this when I deleted a 2 GB video file on my laptop today, which took less than 5 seconds. But when I deleted a separate folder that was smaller than 2 GB, it took way longer to get deleted.

In: Technology

8 Answers

Anonymous 0 Comments

Depends on the drive. HDD drives had a physical “head” that read data on a circular disk, much like a CD. The disks were segmented into clusters of a specific size. When you wrote a file, it would take up several clusters and often leave a bit of space in the last one. Imagine a drive that goes from 1 to 100 and is segmented into 10s.

* The first file is 12 large, so it takes up all of the 10 and a bit of the 20.
* The second file is 8 large but because 2 has data in it, it starts at the 30.
* The third file is 22 large. It starts at the 40 and files up the 50 and some of 60.

Eventually your disk ends up “full” but it isn’t. Thats when it starts filling the gaps left earlier. But now, the “head” has to move around a lot more. Instead of going to one place and read there, it has to jump from place to place to read data. The physical movement costs time.

With SSD drives the answer is a lot more complicated and can range from index position, over charge stability and disk wear, but others have covered this well enough so I’ll leave it at that.

You are viewing 1 out of 8 answers, click here to view all answers.