Most computer-related sites and introductory computer courses will tell you that there's a difference between RAM and storage. RAM is your computer's working space, they'll tell you, and storage – usually your hard drive – is where things are kept until they're needed. That's true in that context, but engineers and computer scientists also speak in terms of primary and secondary storage. In that sense, RAM is storage too.
Everything Happens Somewhere
The core piece of your computer is its CPU, or central processing unit. That's the actual processor chip that does the work, whether it's a high-end chip from Intel or AMD or the cooler-running, lower-power ARM processor in your tablet or cellphone. Its job is to take instructions from the programs you run and then carry out those instructions to manipulate information. The processor chip needs someplace to do its work and someplace to keep the information it's working on. That's where your storage devices come into the picture.
Video of the Day
Primary and Secondary Storage Devices
Your computer contains two kinds of information. One is information that's being actively used by the processor at a given moment, and the other is information you're just keeping around until it's needed. That's how you define primary and secondary storage: If the information is actively in use, it's in your primary storage. If it's not currently being used, but just stored for later, it's in secondary storage.
RAM Is a Storage Location
You may not think of it that way, but your system's working memory – its RAM – is actually a storage location in this sense. It's where your computer keeps information and instructions that it's using right this minute. There's also a specialized form of high-speed memory, called a cache, that's built right into the processor chip itself. When the processor loads a given set of instructions or data, it also reads the next portion and puts it into this area for fast access. Pulling information from the cache is faster than going back to your hard drive, so it speeds up processing.
Primary Storage vs. Secondary Storage
If primary storage is your system's RAM and its cache, you won't be surprised to learn that every other form of storage you use is considered secondary. The main piece of secondary storage your computer uses is its hard drive, but USB thumb drives, DVD-ROMs and even online services such as Dropbox or Google Drive work the same way. The two important things to remember about secondary storage is that it gives you a lot more space than your primary storage does, and it's much, much slower.
Room to Keep Stuff
The amount of RAM in a system keeps going up, but currently, most new computers contain 16GB or less. The cache is even smaller, at just a few megabytes each for eighth-generation Intel i5 and i7 chips, for example. Secondary storage, in comparison, can be as big as you need it to be. Conventional hard drives of 1 to 3 terabytes – a terabyte is 1,000GB – are inexpensive enough for any enthusiast to buy, and network-attached storage and online storage are only limited by your budget.
The Speed Difference is Huge
There are two reasons why primary storage is so fast. First is its own speed of operation, which is measured in millionths of a second. The second is that it's got a direct, high-speed data pathway to the processor. Drives don't have that direct pathway, so they have to move information to the processor through the motherboard. That's like commuting along surface streets, instead of a broad, multi-lane freeway. There aren't as many lanes, the speed limits are lower, and no matter how good your car and your driving are, you won't get there as quickly.
A Couple More Analogies
A couple of other real-world analogies might be useful.
- If you're doing a small repair around your house, the hand that's holding a tool is like your computer's RAM, and your tool belt is the cache. If you have to go back to your toolbox, or – even worse – rummage in your shed to find something, it'll definitely slow down your repair.
- If you're cooking, the ingredients in your pan are like the information in RAM, and the ones sitting beside your stove, already cut up on the cutting board, are in cache. In this example, ingredients in your fridge or cupboards would be in secondary storage.
Secondary Storage Isn't All Created Equal
If you're trying to put together a system that performs well, your choice of secondary storage can matter a lot. Aside from the performance penalty you pay from not having a direct path to RAM, drives can vary a lot in their raw performance. Some conventional hard drives are much faster than others, and modern solid-state drives, or SSDs, are even faster. The fastest drives cost more, so you have to balance your budget and your need for performance.
Rotational Speed in Hard Drives
With conventional hard drives, your data's kept on physical platters, or disks of metal, spinning at high speed. The faster the speed, the better the performance. The lowest-performing disks spin at 5,400 rpm, better ones at 7,200 rpm, and high-end models can reach 10,000 or 15,000 rpm. That means they can read data more quickly once they've found it. Also, the time required to find the data in the first place – a measurement called latency – goes down. That improves performance, but not as much as switching to an SSD.
The Solid-State Advantage
Solid state drives have no moving parts, so there are no physical platters to read. Instead, they use a form of RAM that's non-volatile, meaning it doesn't lose its data when the power turns off. That's much faster than reading from a disk, so SSDs have lower latency than conventional hard drives. They still have to pass data to your processor through the motherboard, so it's slower than primary storage, but it's a big improvement over a regular drive.
Cloud Storage and Offline Storage
Your hard drive is the main form of secondary storage on your computer, but you probably use others. These might be physical things like DVDs and thumb drives, or network storage that puts your data on your company's servers or on cloud servers somewhere out on the internet. These are usually slower, limited by factors like the speed of your internet connection or the USB ports. Thumb drives and DVDs are also sometimes spoken of as offline storage because you have to physically insert them before the computer can make use of their data. They're best used for information you don't access on a daily basis, which is why sometimes the terms "primary storage" and "secondary storage" are used in a different sense.
Another Take on Primary and Secondary Storage Devices
In this alternate interpretation of the terms, the primary storage unit is the hard drive in your computer and secondary storage is everything slower, such as cloud storage or thumb drives, that you use for archived or less-used information. You might also have a high-performance SSD as your primary storage device in your computer, and a large, inexpensive hard drive as the secondary unit. Businesses do the same thing on a larger scale, with higher- and lower-performance network-attached storage units taking the place of the individual hard drives in a home user's system.