What I understand about Random Access Memory (RAM)


Disclaimer: This is my interpretation of the concepts in computer and networking the way I understand it. Everyone has a different understanding of the topics, and how everyone sees something could be different; I am just showing this from my perspective. Of course, what I understood could very well be misinformed or totally wrong. Please do not treat what you see here as fact and always do your own research. These should be for entertainment and comedic purposes only 😉. Enjoy!

As always, I am your host, Prof. Laz. Welcome back to Noob 101. It is another fine day for another lecture about computers, don’t you agree? Last time we spoke about CPU, and now we will be talking about the other components in the computer that you might have heard before, it is random access memory or RAM, not the truck or 🐏 of course.

Here is the breakdown on the topic we will talk about today

  • What is RAM?
  • RAM specifications
  • Single vs Dual vs Quad channel

What is RAM?

As I have mentioned above, RAM stands for Random Access Memory, so the name already describes what it is. It is an essential PC component that the computer will not function without. Most of the time, when you fail to install RAM correctly or are faulty with the RAM module, the computer would not even boot, so you can see how important RAM is in a computer.

With that said, I’m sure some of you might be wondering the role of the RAM in a computer that the computer itself will not work without it? If we compare the central processing unit or CPU to a factory, then the RAM is the factory’s warehouse. The factory’s job is to do the work and produce the product. However, you will need material to make the product, in this case, is the input data (0 and 1).

In a simple term, RAM is serving as a storage device, well high-speed storage devices as a matter of fact, so that if the CPU needs to request data to do a calculation, the CPU will read the data from RAM. The result will then be stored in RAM for future calculation if the CPU needs to recall that result.

If RAM is simply a storage device, what would make it different from other storage devices such as hard drives, USB drives, or solid-state drives (SSD)? That is an excellent question. They are, in fact, very similar but at the time very different from one another. They are similar because they are all storage devices, meaning their primary function is to store data, and data are just a string of 0 and 1; thus, there isn’t any difference if stored in RAM or other storage devices. What makes them different is what will happen to the data after the power is gone. If we want to put it in a broad general term, there are two types of storage devices: volatile and non-volatile. RAM is a volatile type of memory, while a hard drive, USB drive, and SSD is non-volatile memory. As the word “volatile” has suggested, Volatile memory means that it does not retain the information once the power is out. So every time you turn off your PC or the power is out, everything stored in the RAM will be wiped out. The data will still be retained for the hard drive, USB drive, and SSD even after lost power so that all your precious data won’t be lost. There might be a slight chance of data corruption (meaning some bit 0 and 1 was not as it was supposed to be). You might think, what is the point of volatile memory then if it does not retain the data? It is not without its advantage, of course, since it does not need to concern too much with preserving data. It only needs to do its job fetching and storing data as fast as possible and does its jobs very well. Therefore the speed of data transfer between the RAM and CPU is way faster than non-volatile memory, and we need the data flow between them to be snappy, or else we will have to wait for anything to load. Imagine taking 2-3 minutes to load a program in today’s advanced computing is crazy, wouldn’t it 😜.

RAM specifications

Have you ever seen the label on a RAM stick and wondered what they mean? Fear not, though I will not go into the nitty-gritty of detail, I can tell you what you need to know about RAM so that you will have some understanding, and maybe when shopping for one, you can recall what you are looking for. Here are a few key elements for RAM’s speciation that you probably have heard of: capacity, speed, form factor, and “generation.” I used the term generation very loosely because most of the time, the other 3 specs already encompass which generation of the RAM (other than its form factory, of course). Let’s have a breakdown, shall we?

1.Form factor

You know what people say “Things come in different shapes and sizes.” RAM is no exception. Since its primary function is to store data, the most important thing is to make connections with the CPU and the system as a whole. I mean, if the component isn’t connected, there is no way it can perform its function (nothing can), and if you have not noticed, there are little gold pins on the RAM stick, and that is the connectors connect to the memory module. A RAM stick usually has 2 lines of these gold pins on both sides, which is why we called them dual inline memory module or DIMM. I know, I know a very creative name, huh 😜 . However, to make the connection, you need to install the RAM into the RAM slot on the motherboard or directly solder it into the motherboard themself. However, direct soldering of the RAM into the motherboard is usually done in laptops and small single-board computers (SBC) to save cost and space. As in the desktop market, you will often see RAM slots on the motherboard because you have to pick the components yourself, so it wouldn’t make any sense to have RAM directly solder to the motherboard like in a laptop. Though in my opinion, I prefer the RAM slot is not solder because it gives the end-user more flexibility when it comes to upgradability in the future. Also, have you realized that the RAM used on the laptop (if you happen to open one up and take a look) is slightly different from the one used on the desktop? Yes, that is the form factor I was talking about. The desktop RAM is a full long stick of module DIMM. In contrast, laptops and smaller devices use a more compact version of the RAM, called SODIMM. Yes, S really stands for small 😂 SODIMM (Small Outline Dual Inline Memory Module). DIMM is just without the Small Outline. That is the 2 main form factors that you will see a RAM stick come as, so next time, shop for RAM for your laptop. First, you need to make sure that your laptop has a RAM stick slot, and second, make sure you look for SODIMM and not buy the full-fat desktop RAM because I can tell you right now that it ain’t going to fit (that was she said) 😛… Please forgive my sudden burst of immaturely; it was just too good an opportunity not to make such a joke.

2. Capacity

I mean, it is undeniable that you care about the capacity of your RAM as it is a storage device after all, so having a high capacity is always a plus. If you don’t remember from the previous lecture, the storage capacity unit is usually in bytes, and 1 byte = 8 bits, and 1 bit is either 0 or 1. Picking a good RAM capacity for your computer is very important because it is a balancing act between how much you will use realistically vs. the amount it will cost. However, if you have an unlimited budget, then you can skip the thinking part and buy whatever capacity you like as much as possible. I always said it never hurt to have more unless you are broke like me. So why does capacity is important to RAM? It is crucial to a certain extent that it could make or break your user experience. When you want to load a program, the data from the storage devices such as the hard drive will first need to be stored in RAM before the CPU processes them. Imagine you do not have enough RAM space; what will a computer do? They will have to tell RAM, hey man, I need this data. Can you get it for me? Then RAM has to call the hard drive or SSD and order them. You know, usually, ships from China take forever to arrive, right? Same thing here, the data load from storage devices to RAM is way slower than from RAM to CPU. And if the RAM does not have enough capacity, we will experience slowness and a long loading time. Some could be so slow that they ruin the entire user experience as it takes 10 seconds to open a window. I know it is terrible; therefore, my rule of thumb is here. You can get away with about 8GB of RAM nowadays if you don’t use too many chrome tabs and do light works. But I think 16GB should be the minimum for a frustration-free experience besides the price for 16GB is pretty affordable, so I do not see the reasons why you would not go with it if you have the choice, I know that why I said if you have the choice (the keyword here is “If”)😅

3. Speed

I told you before that the advantage of RAM against other storage devices is mainly due to how fast the data is transferred, correct? So yes, speed is critical. You can see many things that represent speed printed on the label, such as MHz, Mb/s, or MT/s. Of course, they are either or most of the time because they represent the same thing, so you probably won’t see all 3 of them showed up simultaneously as it would be redundant. Are you curious about what they mean? Well, then we can break it down.

First, let’s talk about MHz. I talked about Hertz (Hz) in the previous lecture. This is a unit of frequency, meaning how often something happens. In this case, the Hertz unit describes how often something happens in 1 second. So if you see a 60 Hz refresh screen, it means that the screen refreshes 60 times in 1 second. M stands for Mega; it is a prefix for the unit and means it is 1 million times. So 2 MHz means 2 million Hertz, simple as that. Now that you understand what MHz is, what does it do with the speed of RAM? Well, you see, Hertz is a frequency unit; something happens in 1 second. What is something in this case? That will be, of course, data transfer. And data transfer usually is 8 bytes for each, so let’s say the specification says a RAM speed is 100Mhz. We can take 100 MHz x 8 bytes = 800 MB/s. So in 1 second, the speed of transfer is 800 MB. Pretty straightforward, right?

So what is the difference between MB/s and Mb/s, then? Well, besides capital B and lower case b, there is not much difference. MB/s read as Megabyte per second, and Mb/s read as Megabit per second. Do you get it now? 1 byte = 8 bits. It is just that simple. Well, how about MT/s then? MT/s are Mega transfer per second. Transfer here is a bit complicated compared to the other two as it is not quite the raw number of bits transfer but rather the commands or operations and how “effective” the transfer speed is.

Of course, other than what I mention, some other things could affect how you view the speed of a RAM module, such as RAM’s timing like CL 16… it is the measurement of the latency between RAM’s components. It is not something an average user should be concerned about, but it is good to know, and you get a slight performance (at least on paper).

4. Generation

I used to term generation very loosely because, to be honest, I was not too sure how to adequately describe them. But you have probably seen something like DDR2, DDR3, DDR4. Yes, the 2,3,4 is the” generation” I was talking about. I called it such because it shows a leap in technological advancement in term of memory technology as each jump increase the performance drastically in term of speed and capacity. Each jump in the generation is also accompanied by a change of pins layout and design, and thus, most of the RAM is not backward compatible. I mean, most motherboards and CPUs only support a particular generation of RAM, so it is not like you can mix and match them. DDR5 is the new kid in town and promises a significant increase in speed and performance compared to its predecessor, DDR4. However, we have not really seen much improvement at the time of this post, so we will have to see. If you are curious what DDR stands for, it is Double Data Rate, and no, it is not Dance Dance Revolution. 😉

5. ECC What?

We know that Servers are just computers, so what makes it different from our consumer PC? Well, most of them are designed to run 24/7 and have different priorities when it comes to services (and using more “data center” types of CPUs, there are not that much different, to be honest. For RAM, there are some differences that enterprises and business servers are using ECC RAM compared to the consumer market RAM, which is non-ECC. ECC stands for Error Correction Code. What it does is that there is an extra bit of data to check and make sure the data is not corrupted, and if it did, it could correct it. This is important because businesses require their servers to be reliable and stable as possible, and ECC helps prevent data corruption. No data corruption equals less time to maintenance, thus reducing downtime. For the regular consumer, while it would be nice to have the error checking feature for RAM, it is not really necessary since average users don’t really need all the data to be errors free as most of the time, you probably won’t even notice if 1 of the bits was not right anyways🤷‍♂️. With that said, if we can make ECC become a standard for RAM and that the consumer market can adopt without being charged an arm and a leg from the manufacturer, then I’m all for it.

Single Vs Dual Vs Quad channel

I’m sure you probably heard people talking about the RAM configuration with single channel or dual channel before, right? What does it mean exactly? I might have repeated myself, but most of the time, whatever it sounded like is precisely what it is 😂. Single-channel is one channel, dual channel is 4 channels 🤷‍♂️. Well, it is a little bit more than that but not as complicated as you might think. So you understand that the most critical role for RAM is fast data transfer, right? So let’s say you need to transfer the same amount of cargo. What would be faster between one big truck that can handle the entire load, so it only needs to make versus two smaller trucks, only able to handle half of the load each. On paper, they can get the delivery at the same rate; however, having 2 smaller trucks makes the transfer a lot more efficient as sometimes the amount of cargo isn’t that much anyway. It is the same concept as single-channel versus dual-channel RAM. You will be able to perform all the computing task just fine with just a single stick of RAM but for some application, having 2 sticks of RAM to make it a dual-channel configuration really make a difference when it comes to the speed of the data transfer. The same logic applies to quad-channel. It just means the RAM configuration workload is divided between 4 RAM modules per set. The most common RAM configuration setup you probably will see in the consumer market is dual-channel, mainly because most CPUs support it. It is a balancing act between performance and cost. And no, even when you see 4 RAM slots on your motherboard, it is still dual channel configuration; it was just 2 sets of dual-channel, hence why you see the manufacturer recommend you fill the slot in specific order to make use of dual-channel configuration. Quad-channel configuration was mainly used in the enterprise and servers. So yea, if you saw your friends only have 1 stick of RAM, then maybe tell them to stop being cheap and please get another module so that they can take advantage of the dual-channel. I know there are some pre-built PC out there cheap out on this and only give you one stick of RAM, and that is not okay as you are losing out on some serious performance by simply adding another stick of RAM.

Conclusion

It has been quite some time since the last lecture. I could not have it out because I was a bit busy (and lazy) but mainly busy. This is, of course, just a tip of an iceberg about RAM, there are so many things I gloss over when it comes to it, but at least I hope this gives you some overall understanding about PC components and how everything comes together. At least next time when someone asks you what computer memory is, you can proudly tell them it is just like a 🐏 or truck.😜

Well, that is all the time I, Prof Laz, have for you this week. Take care! Have a wonderful week, and I will see you in the following lecture whenever it might be (maybe in a few months).

-Prof. Laz