Josh:

My first official job in tech was as a help desk technician during my winter, summer, and spring

breaks from college. I had my A-plus certification, so I thought I knew everything, and I couldn't have

been more wrong. But it was at this job that I learned how sticks of RAM can cause so many issues. The main part

my job was working on tickets from users. This was just a shared inbox in Outlook where users

would send emails. A common complaint was my computer won't turn on. So I would make the

hike to the users, wherever they were in the corporate complex, and bring their computer

back to the help desk. This is when I learned from the help desk administrator how to troubleshoot

RAM. We would pop open the computer case, blow out the dust, unseat the RAM sticks from the

motherboard, blow it out again, and plug them back in. Nine times out of ten, this would fix the issue.

Other times, we would replace one stick of RAM at a time until we found the bad one.

This is where I learned that the real world was different from school. Yes, there were programs

you could boot from removable media, test the RAM, and determine which one was having issues, if any.

But in reality, it was quicker and easier just to replace them and see if that fixed

the issue. The part that was truly enlightening to me is that the first time I saw this happen,

I said to the help desk admin, wow, this must be a rare issue. And he told me, nope, happens about

once a week. That's when I learned that when you scale something up to thousands of computers,

uncommon issues become common. The piece of your computer that looks like a stick of forbidden gum,

on this episode of In The Shell.

The wrong thing to do is just go out and buy a computer and then learn about it. You'll learn,

but you'll learn a lot of things that maybe you didn't want to learn.

A computer that you buy today will likely be obsolete six months from now, and there's not

a dang thing that you can do about it.

My name is Josh, and I'm able to keep this podcast independent and advertisement-free because of support

from listeners like you. If you are finding value in what I'm doing here, consider becoming a paid

supporter at members.sideofburritos.com. And as a thank you, members get early access to new videos,

ad-free versions of everything, bonus content, and access to a live monthly Q&A.

Thanks for considering. Now let's get back to the show.

RAM, or random access memory, is essentially your computer's short-term working memory.

It's where the computer holds the data and programs it's actively using right now so that the CPU can

access that information as quick as possible. The random access part of the name isn't about

doing things haphazardly. It means the CPU can read from or write to any part of the memory in

roughly the same amount of time, no matter where that data lives in the RAM chips. This is in contrast

to old-school storage like magnetic tape, or even your hard drive, where the time to fetch the data

depends on its physical location. Tape reels have to wind, and drive heads have to move, which makes

for much slower speeds. In simpler terms, RAM is like the workbench or table, where you lay out the

papers you are working on, whereas your hard drive, or SSD, is more like a filing cabinet.

If you know exactly which file cabinet drawer has the info you need, it's still slower to walk over

and dig it out, compared to grabbing a paper that's already on your desk.

RAM is that desk. It gives the CPU quick access to the stuff it needs, without fumbling through

long-term storage every time. It's made of electronic components, tiny transistor-capacitor pairs,

on silicon chips, which means it operates at electrical speed. We're talking nanoseconds for

the CPU to get data from RAM, versus milliseconds or worse from a spinning disk. For perspective,

reading data from RAM might take on the order of 100 nanoseconds, whereas even a fast SSD,

solid-state drive, takes around 100 microseconds, which is 1,000 times slower. And that old hard disk drive

....

...

...

...

might take 10 milliseconds, around 100,000 times slower than RAM. This is why modern computers try

to keep as much data in RAM as possible. If you see high RAM usage on your computer or phone,

this is not necessarily a bad thing. So what actually is RAM made of? If you open up your

computer, you'll see thin rectangular sticks plugged into the motherboard. A typical desktop

RAM module is a slim circuit board with multiple black integrated circuit chips on it. Each chip

contains millions or billions of tiny memory cells that store data as electrical charges. Essentially,

each memory cell holds a bit, a zero or a one, by either having a tiny electric charge or not.

In the most common type of RAM in PCs today, DRAM, which is short for Dynamic RAM,

Each bit is stored in a tiny capacitor that leaks its charge over time and needs to be refreshed thousands of times per second.

This design is why RAM is volatile memory.

Volatile means that when the power is turned off, RAM forgets everything.

All those electrical charges dissipate, and any data in RAM is gone.

This is why unsaved work disappears if your computer crashes or loses power.

The data was only in RAM and never got written to persistent storage.

By contrast, your storage drive, whether a solid state drive or hard drive, is non-volatile.

It keeps information stored even with the power off, which is why your files and programs are still there when you reboot.

A fun fact, those little sticks of RAM you plug in are often called DIMS, dual inline memory.

modules. So if you have a laptop, you might have a smaller version called SODIMS, small outline

dual inline memory modules. These are standardized modules that make it easy to add or replace memory.

So why do people keep saying upgrade your RAM when your PC feels slow? What difference does

it make if you have, say, 16 gigabytes of RAM instead of 4 gigabytes? With more RAM, your

computer can keep more stuff in that quick access space, meaning it can handle more open applications,

more browser tabs, and more large files. As a result, multitasking is smoother and overall

performance improves. The CPU isn't any faster in gigahertz, but it spends less time waiting around

for data to load from the slow drive because the data is already in RAM. Conversely, if you don't

have enough RAM,

The system will struggle when you try to do too much.

You might have noticed this if you've ever had, say, only 4GB of RAM and open a ton of browser tabs or a big application.

At some point, things get really sluggish.

What's happening is your RAM filled up.

To avoid crashing, the computer starts using parts of the hard drive as pretend RAM in a process called swapping or using a page file.

Now, swapping data to disk is painfully slow next to actual RAM.

As a result, when your system is forced to swap, you get slowdowns, freezing, and delays.

This is why having more RAM can speed up a system.

But let's rewind a little bit.

Computer memory has come a long way.

The first generation of computers in the 1940s didn't have RAM as we know it.

They used a...

devices like delay lines or mechanical drums that could only access data sequentially.

You can think of this like forwarding through a cassette tape to try and find a song.

By the 1950s, we had a form of true random access memory called a magnetic core memory,

which was basically a grid of tiny magnetic donuts, rings, strung on wires. Each little

ferrite ring stored one bit, and you would flip its magnetization for a zero or a one.

Core memory was durable and non-volatile, it remembered data with the power off,

and terms like core dump from a memory error still echo that era.

But core memory was also relatively bulky and expensive to make.

The big revolution came in the 1960s and 70s with semiconductor memory using silicon chips.

In 1966, an IBM engineer named Dr. Robert Denard figured out a way to store a bit using a single

transistor and a tiny capacitor. A few years later, in 1970, Intel released the first commercial DRAM

chip, the Intel 1103, with a capacity of 1,024 bits. That's just one kilobit, which is only

128 bytes of data. 128 bytes is around the size of a short tweet or a couple sentences of text.

It's almost laughable by today's standards, but at that time it was revolutionary to have a solid

state memory chip that could hold that many bits and be randomly accessed at high speeds.

From there, memory density and capacity exploded as chip manufacturing improved.

We went from kilobits in the 70s to megabits in the 80s.

to gigabits in the 2000s.

The modules in your PC likely use DDR4 or DDR5 DRAM,

DDR stands for double data rate,

which are all just successive generations.

They are all still based on Denard's principle

of one transistor and one capacitor per bit,

just vastly scaled up and sped up.

Modern RAM modules transfer data at many gigabytes per second

within the PC.

Yet interestingly, as fast as main memory is,

it's never fast enough for the CPU.

That's why CPUs also have even smaller

and even faster memories called caches,

sitting right inside the CPU chip.

Those caches are usually made of SRAM, static RAM,

which doesn't need refreshing and is blazingly quick,

but SRAM is too expensive and bulky to use

for all system memory.

So the hierarchy goes, tiny super fast caches inside the CPU, then the larger DRAM, your RAM

sticks, as the next level, then the much larger but slower storage. It's a balancing act of speed,

cost, and size at each level. I truly find RAM fascinating. Most people know it as the option

you select when building or buying a computer, but there's so much more to it. When you don't

have enough of it, it's always on your mind. But when you have more than you need, it never

gets the attention it deserves. In the Shell is written, researched, and recorded by me,

the non-volatile podcaster. If you are listening in an app that lets you rate shows, please

take a minute to rate this one. I would truly appreciate it.

I told my friend a joke about RAM, but he didn't get it.

What a dimwit.

That's it.

Take care, and I'll see you next time.