Going through the superuser.com website, I found an interesting piece of content and I thought it will be nice to share it here too.
I have been looking at a bunch of videos and now understand a bit better how computers work. I better understand what RAM is, volatile and non-volatile memory, and the process of swapping. I also understand why increasing RAM speeds up a computer.
I don’t understand why cleaning up disk space speeds up a computer. Does it? Why does it? Does it have to do with searching for available space to save things? Or with moving things around to make a long enough continuous space to save something? How much empty space on the hard disk should I leave free?
It doesn’t, at least not on its own. This is a really common myth. The reason it is a common myth is because filling up your hard drive often happens at the same time as other things that traditionally could slow down† your computer. SSD performance does tend to degrade as the drive fills, but this is a relatively new issue, unique to SSDs, and is not really noticeable for casual users. Generally, low free disk space is just a red herring.
For example, things like:
- File fragmentation. File fragmentation isan issue††, but lack of free space, while definitely one of many contributing factors, is not the only cause of it. Some key points here:
- The chances of a file being fragmented are notrelated to the amount of free space left on the drive. They are related to the size of the largest contiguous block of free space on the drive (e.g. “holes” of free space), which the amount of free space happens to put an upper bound on. They are also related to how the file system handles file allocation (more below). Consider: A drive that is 95% full with all free space in one single contiguous block has 0% chance of fragmenting a new file ††† (and the chance of fragmenting an appended file is independent of the free space). A drive that is 5% full but with data spread evenly over the drive has a very high chance of fragmentation.
- Keep in mind that file fragmentation only affects performance when the fragmented files are being accessed. Consider:You have a nice, defragmented drive that still has lots of free “holes” in it. A common scenario. Everything is running smoothly. Eventually, though, you get to a point where there are no more large blocks of free space remaining. You download a huge movie, the file ends up being severely fragmented. This will not slow down your computer. All of your application files and such that were previously fine won’t suddenly become fragmented. This may make the movie take longer to load (although typical movie bit rates are so low compared to hard drive read rates that it’ll most likely be unnoticeable), and it may affect I/O-bound performance while the movie is loading, but other than that, nothing changes.
- While file fragmentation is certainly an issue, often times the effects are mitigated by OS and hardware level buffering and caching. Delayed writes, read-ahead, strategies like the prefetcherin Windows, etc., all help reduce the effects of fragmentation. You generally don’t actually experience significant impact until the fragmentation becomes severe (I’d even venture to say that as long as your swap file isn’t fragmented, you’ll probably never notice).