You have to think of the PURPOSE of RAM and "Mass Storage" to begin with - the faster something is, the more expensive it is, and the more "volatile" it is as well. So if you want cheap and lots, it's going to be slow. If you want fast, it's going to be expensive and probably not permanent.
If you think of all the "storage" a modern CPU uses, it (usually) goes like this, from fastest and least, to slowest and most:
- CPU Registers - There's usually only a couple of dozen words (64-bits is a word in many, 32-bits in most others, and then older/smaller things have smaller bits per word) and it's right on the processor, right IN THE MIDDLE of where the "actual processing" happens. The only way it's faster than if it's a register is if it's literally an intermediate in the calculation. You don't even have 1kB worth of registers on a typical processor, but they store some of the most important information like where in the program you're running you currently are. They are swapped out constantly for what's happening at the moment, and some low-power modes of processors preserve their state, but lots (most?) don't.
- CPU Cache - L1 and L2 - Yes there's two of these. These are often in processor marketing these days (well, TECHIE marketing at least), and they are perfectly named - they cache information closer to the processor itself, these days ON the processor. It used to be off-processor (remember the days of CPU slots? The L2 cache was part of the package there) on the motherboard, and in some very small processors it doesn't exist, but basically this stuff is really fast, and stores things physically close to the processor so that if something is being actively worked on, it's "basically there" for the purpose of the program. L1 is smaller, and is literally the first thing past the registers that's "checked" for information, and L2 is slightly further away, but also slightly bigger. A "cache miss" is a big deal on needing to pull something from main RAM and not from the cache. It's why when working on data sets you want it in contiguous memory slices, so that it as much as possible can be in cache at once.
- Main system RAM - This is where everything that's actively running on the system should be in. If you exceed this, then you need to cache things to the hard drive (or SSD, or whatever). This whole thread is about how it may be replaced with an SSD so that it's non-volatile, but usually when sleeping, this is how "suspend to RAM" works from. It's "fast" in that it's orders of magnitude faster than a hard drive, but from a processor's perspective, it's actually really slow and "far away."
- Mass storage - Hard drives and SSDs - This is where things are stored which you expect to be there after shutdown, or power cycle. Hard drives are orders of magnitude slower than RAM, but offer orders of magnitude more storage, and it doesn't go away when you shut off your machine. Running CPU programs from Hard Disk is impractically slow.
To use an analogy, if the CPU thread doing processing is a carpenter working on something with their hands, the CPU register is the bin of stuff that s/he reaches for and grabs from that's at the bench with them. L1 cache is in the same room. L2 cache is in the next room. System RAM is the truck out front with all of your stuff in it, and the hard drive is the hardware store an hour or two away that takes TIME to get to, but has literally everything.
TL; DR;
Memory Hierarchy
I hope that makes sense.
My opinion on the new tech - Unlike the extremely excellent SSD Endurance Experiment (
original,
latest) which shows you'll essentially NEVER blow through an SSD on a consumer machine, RAM gets a LOT more stress. I'm skeptical about its lifespan. I hope that's something that gets taken into account, or that technology solves the burnout problem. It might! We'll have to see.
And I wrote that all before looking at Wikipedia. I kind of
should know this, as this is what I do. Also, for this example, "the cloud" may as well be on Mars unless you're on Gigabit. Then maybe it's only in the clouds themselves.