What is a RAM?
RAM acts as an interface between storage devices and processor. Data is read from storage devices (HDD or SSD) and fed to processor. Any data read or written back and forth is done through RAM. Example, Windows (or any OS) is loaded from the storage device. Any software is loaded from storage devices in parts. All this is done via RAM.
CPU is the command center, you are the commander. RAM is the road and Storage devices are houses. People use their cars to come to this command center, take order, do tasks and return back home. All this is done via RAM (the road infrastructure). More about SSD here (Houses).
What are the types of RAM?
All RAMs are volatile memory. As soon as power goes off, data on RAMs is erased.
There are two types of RAM. Then there are sub types of these two RAMs. First is SRAM. SRAM is Static RAM. Second is Dynamic RAM (DRAM). Random access allows CPU to access any data without reading sequentially from starting point.
So, if CPU needs to find the the car it can search randomly. It does not have to start from Car No.1 in RAM. In Storage devices, RAM has to read houses sequentially from House No.1.
SRAM is mostly present within CPU as Cache Memory. SRAM uses an expensive way to store data in flip flops. But it is much faster and needs less refresh. It acts as an interface between DRAM and CPU. It stores registry files and has fast memory.
DRAM uses transistors and IC to store data. IC has a set of transistors. Each transistor stores a bit of data. All the chip modules on RAM are ICs. This is much cheaper way to store data than flip flops.
DRAM has two subsets – SDRAM (Synchronous) and DRAM. Normal DRAM fetches data as soon as command is given. SDRAM uses clock cycle. It is synchronous to the memory clock. Thus, it is more efficient via pip-lining and faster than normal DRAM through clock cycles. Normal DRAM has subtype of SIMM. SDRAM is subdivided into DIMM.
What are SIMM and DIMM? and DDR?
SIMM is single-in line memory module. It is subset of normal DRAM. From the name itself, SIMM has ICs on the single side of the RAM only.
While, DIMM (Dual-in line memory module) uses both sides of the RAM for ICs. DIMM is a subset of SDRAM. We know from previously, IC has transistors. Each transistor stores 1 bit of data.
Similarly, SIMM the bus width is limited to 32 bits. While, DIMM has 64 bit of bus width. All processor require 64 bits of bus width. Hence, SIMMs needs to be used in pairs always. While DIMMs can have single RAM to function. DDR RAMs is a subset of DIMMs. All DDRs are DIMMs.
DDR is double data rate. From our example, it is like double decker bus. All modern RAM uses this bus for carrying more data per clock cycle.
Currently, DIMM are categorized into DDR 1, DDR 2, DDR 3, DDR 4, and DDR 5. Also, in GDDRs (Graphics) More about GDDR here.
Below are the details of DIMMs:-
What is Memory Bandwidth? How to calculate Memory Bandwidth?
Bandwidth is the maximum volume of data RAM can transfer to and from CPU in a second. In our example, it is the number of lanes on the road. In SDRAM, it highly depends on clock frequency supported. The bus width remains the same. But as we go from DDR 1 to 5, the bandwidth increases.
Bandwidth is calculated as : Clock Frequency (in MHz) * Bus Width / 8 (in bytes) * No. of Interfaces installed.
For Example, below shows Corsair RAM 8 GB DDR4 with 3,000 MHz clock frequency. So, Bandwidth = 3000 * 64/8 * 1 = 24,000 MB/s. Same as mentioned PC4-24000, PC4 is DDR4 and 24,000 is the bandwidth. Here, if two RAM slots are used, bandwidth becomes 24,000 * 2 = 48,000 MB/s or 48 GB/s.
So, Clock frequency in RAM is already Double Data Rate (DDR). Interfaces is the number of RAM slots installed. Installing in pairs is always best. This way increases the bus width from 64 bits to 128 bits. And hence, bandwidth is also doubled. It does not matter if the second RAM is lower in size than the first.
In some advanced Motherboard, they offer QDR RAM support. That means 4 RAM interfaces or slots. This increases the bus width by four times.
All this is fine, but CPU has support for a maximum bandwidth. Like below. It shows CPU supports upto DDR4 with max. frequency 2133 or 2400 MHz only. So, any RAM above this will either not run or support upto mentioned.
Should I use single RAM of 8 GB or 2 RAM of 4 GB each?
Bus Width supported from DDR 1-5, is 64 bit. Now, Interfaces is the data channel for RAM. Typically, motherboard supports atleast 2 Interfaces for RAM. This means 2 RAM slots are generally supported. Hence, the bus width is increased to 128 bits. Therefore, it generally best to use RAMs in pairs.
What about RAM speed?
We have come to know about roads. In DDR4 it is like expressway, while DDR1 is city roads and DDR2 is the outer road. But, roads don’t determine the speed of the car or bus. It depends on the car itself for speed.
Speed in dependent on the clock cycle speed. How fast is the clock running. A 800 MHz frequency in RAM means 800 Mega (10^6) cycles can be run per second. So, how much does it take for 1 cycle to complete?
One Cycle time = 1 second / (800 * 10^6) or 1.25 ns (nano second).
When memory controller receives instruction to fetch data. It reads them from a specific memory column. The delay in retrieving and uptill the data exits the RAM from pin is CAS Latency. This determines the latency of RAM. It is measured in clock cycle.
So, Latency of RAM = SDR Clock Cycle time * CAS Latency.
In below for example, CL is 16. Clock Cycle time is 1/(1,500 * 10^6) = 1.334 ns. So, now Latency of RAM = 1.334 * 16 ns = 21.344 ns. Lower this number, faster would be the RAM. CAS Latency is also mentioned as X-X-X-X or C XX. Here, first X/CXX is the CAS Latency. Rest of them are other latencies.
It does not mean higher frequency leads to higher speed. An easy way is to divide the frequency with CAS Latency.
For example, Corsair Vengeance 2400 MHz, CAS 16 and Crucial 2666 MHZ, CAS 19 DDR4 RAMs. Which one is faster. If we see Corsair 2400/16 = 150. And Crucial 2666/19 = 140. Higher the Ratio, faster is the RAM. So, Corsair is faster as compared to Crucial RAM mentioned.
How to buy a RAM?
First, need to check the support of RAM in motherboard and CPU installed on the motherboard. Next, see the CAS Latency of the RAM. Lower the CAS better.
BUY RAM in India here.
Buy best Networking, CCTV and Desktop products online in India here at networkitstore.in