I teach 109

I'm Luke, I teach CMPT-109 at Montclair State University and this is my blog.


Does a full hard drive slow down your computer?


student-resource

Your computer is filled to the brim with vacation photos, music, movies, games and random documents. This must be why it is so slow, right? Wrong. Very, very wrong. While it is true that a hard drive that is about 99% full, may cause some problems, the amount of available storage space on your computer usually does not affect the performance. The primary function of a hard drive is to store and preserve your files. If this very function was being detrimental to the computer performance, it would be a very bad design flaw. So no, the piles upon piles of pictures and mp3s sitting on your hard drive do not slow you down. You gain absolutely nothing by deleting them.

It is easy to see how this misconception took root in the public consciousness. It stems from the lack of understanding of the distinction between main memory and storage1. The logic is that if you clutter your machine with useless junk it will become slower. But it makes about as much sense as believing that cluttering the back seat of your car with junk will make it drive slower.

Just like the back seat (or trunk) of your car, storage is just a space where you can put stuff. Files you put on the hard drive lie dormant until you need them. Your computer doesn’t actively do anything with them. It will happily ignore hundreds of gigabytes of movies and music unless you specifically tell it to access them. It is helpful to think of computer storage as an attic/basement in your house - a place where you stow away things you are not using. These things are out of sight and out of mind - they might as well not exist as far as computer performance is concerned.

When you tell your computer to access a file, it has to load it to main memory. That’s the functional, short term memory which has to hold everything that your computer is working on right now. This space is usually much smaller than storage (on average you will have anywhere between 2 to 8GB of RAM vs 200-500GB of storage) and must be shared between all the running programs (Windows, antivirus software, Word, Excel, iTunes, etc..) and data (open documents, videos you are watching, games you are playing right now, etc..). The more programs are running simultaneously, and the more documents are open at the same time, the less memory is there to go around, and the busier the CPU becomes. All the documents and programs start competing for those two resources (CPU time and memory allocation) which causes the slowdowns.

So what slows down you computer is not what you put on the hard drive, but what you have open when it is running.

But My Computer used to be fast and now it is slow. Why is that?

Typically, over time computers will become slower. Some of this may be your own fault, and some might be things that are out of your control. Here are few factors that usually contribute to performance degradation over time:

  • Software Bloat - the software industry takes Moore’s Law2 for granted. Users are expected to keep up with the progress and replace their computers every few years. Therefore typically each new version or update of any given program is more memory and CPU intensive than the previous one. This is for example why an 8 year old computer can’t be expected to run Windows 7 or OSX Mountain Lion - these systems were designed for modern computers. Similarly running the latest version of iTunes may prove to be detrimental to it’s performance. As your computer ages, and software is updated it is to be expected that the performance will degrade.

  • Resident Programs - a rather popular, and unfortunate trend in software design as of late is to configure it to start with Windows by default. For select programs this is useful - for example, if you let Adobe Reader start with Windows, it will open PDF documents much faster than usual. It becomes an issue when almost every software vendor offers this option, and has it enabled by default. An average computer may end up running dozens of resident applications that are not actively doing anything 90% of the time, but still eat up memory and CPU cycles degrading performance. If you look in your Task Bar area next to the clock, you may see applications such as Adobe Reader, Quicktime, Skype, MSN Messenger, print monitoring software from HP, Epson, Brother or Cannon, Anti-Virus software, hardware vendor specific modules (like Dell Quick start), icons for configuration software from Intel/AMD (CPU manufacturers) and nVidia/Radeon (video card manufacturers), various Wifi monitors, digital content delivery platforms (Steam, Orgin, Stardock, iTunes, etc..) and more. All of these have a purpose and can be useful but most do not need to be running all the time. Disabling the unnecessary resident programs and services can often cause huge boosts in performance.

  • Malware - viruses, trojans, worms, spyware and addware all tend to monopolize CPU and Memory resources. Many people’s computers run dozens of hidden processes or even function as illicit email relays, file servers and infection vectors without their knowledge or approval. Unlike legitimate software designers, malware writers usually don’t worry about performance - their software is not optimized to be fast, or use as little memory as possible. It tends to be memory hungry, bloated, and sloppy. Even a minor infection can have a significant impact on the speed of your computer.

    Many users labor under the misconception that they can’t get infected by malware, because they do not browse shady internet websites. This is like thinking you won’t catch the flu virus because you don’t happen to go to crazy frat parties or raves. It is absolutely irrelevant, since you can get infected by opening the wrong email, following the wrong link, or trying to redeem an online coupon without realizing it is a scam.

  • Anti-Malware - ironically, anti-malware suites from McAfee and Symantec are often the biggest performance hogs. This is especially true for the so called internet security suites which ship with a long list of various monitoring features. Not all of these are appropriate for end-users, and unless used with top-of-the-line hardware, they can often seriously degrade performance - especially after a few updates.

  • Fragmentation - It is true that over time the performance of you hard drive might degrade due to fragmentation. As we learned in class, the hard drive tries to use all available space it has. By default it tries to save files using contiguous sectors on adjacent tracks to minimize the R/W head movement and thus prevent seek delays. This is of course not always possible so sometimes files get scattered throughout the drive requiring many seeks to fetch them. This is usually more of a problem on older systems when for example your computer will try to reclaim the free space left after deleting small files, by writing chunks of bigger files in the “holes” they left.

    While this is not a terrible thing for data files, it may affect performance of newly installed applications. For example, if a program you just installed has very badly scattered files, it will start more slowly, as the hard drive must perform many seeks in order to load it into memory. On Windows systems this can be resolved by de-fragmenting the drive. Macs and Unix computers usually de-fragment their drives automatically.

    When it comes to performance fragmentation is usually the least of your worries and the performance gains gained by frequent de-fragmentation have most to do with how fast applications start, or how fast the system can perform when it runs out of memory and starts paging to disk but usually have little effect on general responsiveness or snappiness of the system.

Combine all of these factors together, and you can get a picture why your computer slows down over time. As you use it, you tend to download and install more and more software. A lot of that software includes resident components or services. So you end up running more and more things simultaneously. At the same time, each time you download updates, they have a potential to make the software you already run, more bloated and resource intensive. Electing not to install updates is a very bad idea, because it leaves you vulnerable to malware infections that will degrade your performance even quicker.

The quickest way to improve the performance of your computer is not to delete old pictures and movies but to un-install and/or disable all the software you don’t need. Instead of trying to manage your storage, you have to manage your main memory by not allowing applications to launch at startup unless it is absolutely necessary.

  1. sometimes referred to as secondary memory

  2. Moore’s Law states that the available processing speed doubles every 18 months.