eli5: How does storage impact computer performance?


I was at work and some computers that were nearly maxed on storage were basically unusable. This doesn’t make sense because my understanding was RAM was the storage the computer uses to run tasks and the storage was for things downloaded

My guess would be that the storage is used for ‘long term’ RAM, something that will be needed for a while anyways but idk. Outside of that I can’t really think of anything else

In: 10

You’re right about how RAM vs disc storage is used – but there’s more to it.

First off, the computer only has a certain amount of RAM available to use. While newer computers have a lot more than earlier versions, newer computers are also better at juggling multiple tasks. Each of those juggled tasks needs memory for their operations.

Depending on the task being done, the computers master controller in charge of overseeing all those other parallel tasks may need to free up some space in RAM. When it does this, it needs to store the current state of the RAM for whatever process it’s taking it from.

So think of it like this: RAM is the space on your desk where you can put your papers in order to work. The disc is the filing cabinet beside your desk, where your papers are stored when you’re not using them.

In order to do more work, you need more desk space. You neatly organize some papers on your desk not currently needed, open the file cabinet, find the right place for them by referring to a master list of “where things go”, put the files away, then you look up the files you need now, pull them out, and put them on your desk.

If your desk is really full it’s not great but if your FILING cabinet is really full – and worse if your filing cabinet is really full and a disorganized mess – putting things away and pulling new things out takes longer. Full enough and you can spend more time moving papers around than you do working on them.

More space helps (both more RAM *and* more disc space to an extent in each case) – so does keeping your drive neat and well organized – so clean up your trash, defrag your hard drives, and also reboot periodically (daily) to ensure the desk isn’t loaded up with stuff you don’t actually need but is kinda stuck hanging around anyway.

Computers will store the stuff that won’t fit into RAM on the hard drive in a Paging File (windows) or Swap (Unix/Linux). You don’t want to get over 95% drive utilization because it is now having to shuffle drive storage around a lot more than if it could just write anywhere it wants.

If you are taking about disk storage, older platter hard drives that have to actually move a plate and read head to access data can degrade in performance over time and with increased data due to something called fragmentation.

The files on your computer aren’t monolithic entities. They can be broken down into chunks and retrieved and put together again later. When you start running out of disk space, the size of each empty space may be smaller than the total file size of your file, and it will get split up and stores in pieces, which are slower to retrieve.

Imagine you had to store 10 balls. If you could put them all in one bucket in a single room, then it’s pretty quick for you to grab them when you need them. If you don’t have anywhere that can fit 10 balls, you have to put 2 in your kitchen, 1 in the bathroom, 2 in the bedroom, etc. Then, when you need to get them all, you spend a lot of time running around your house collecting all the balls before you can use them

In addition to what others have said: RAM is temporary storage. Data in RAM goes away if the computer crashes, power fails, a program aborts, etc. Storage systems, whether they use HDDs or SSDs, are designed to store far more data, and to keep it around for as long as you want.

However, while fast, storage systems are not infinitely fast. Suppose you are running a job to process payroll. Every employee’s data has to be accessed. Payroll records have to be written to storage where they will last. But the amount of actually computing on that data is pretty small. So this job’s speed will likely be limited by how fast the employee time-card data can be read from storage and how fast the payroll records can be written to storage.

Even if the total amount of data you need to process is small enough that it could be in RAM, that isn’t where the data is, and the process of reading it into RAM will take some amount of time.

There are multiple meaning of storage.

RAM would be primary storage, directly accessible from the CPU and fast. Most primary storage today is volatile which mean the information is lost when not powered

A hard drive or an SSD would be secondary storage, it is not directly accessible by the CPU data need to be copied to primary storage. It is a lot slower than the primary storage but also cheaper so you can have more of it. Secondary storage is also non-volatile so information is retained without constant electrical power.

Offline storage is any type you can remove like a CD, USB memory, SD card etc IT requires a human to connect it.

There is tertiary storage too, which would be removable storage with a robotic mechanism like a tape library. This is not consumer produce but are used by companies.

Storage can mean just a single type or a combination of types depending on context and person. I would never call RAM just storage, I would only use of for secondary storage and below that but it is not uncommon that people use the word storage for RAM.

So the statement “the computer has run of storage” can have multiple meanings and it is hard to know which is used.

A computer gets slow when the program needs more RAM than is available. You can use secondary storage as fake ram often called virtual memory. The problem is the speed will be slower by a factor of 100-1000 times. This is likely what you talk about.

It is just not that the program needs more RAM. The operation system will recently access files on the secondary storage in RAM so you can read and write to them faster. If programs use up all RAM there is no left for this disk cache and it has to be written to and from the secondary storage all the time. It is not just Secondary storage that is faced like that. Programs that access data after the internet can user RAM to cache that data too.

The ram requirement then increases with new updates of suotware. This is because more features are usually added and the programmers assume people have more RAM. If you do use more RAM you can make stuff fast for some applications.

So update so software, will both the operation system and software you install usually increase RAM usage- More and more programs tend to be installed over time too. Lots of them have parts that are always on this alos increases RAM usage

The best upgrade of a computer that has become slow today is to get more RAM and to upgrade the disk the operation system is on to an SSD. CPU performance has not increased that much in the last decade. So enough RAM and an SSD instead of an HDD make a huge difference. It is likely not enough to play the latest game but for more everyday usage that in large part will be web browsers that require a lot of RAM today the difference or computers made today is not that large.