DEV Community

Cover image for How to upgrade your PC's RAM
Richard Lenkovits
Richard Lenkovits

Posted on

How to upgrade your PC's RAM

Short preface, no BS

Howdy!
You probably ended up here because you like to have 50 chrome tabs open need to upgrade your PC's RAM and you want to do it right. I just upgraded RAM in my PC so let me spare you all the time I spent to figure out all the technical stuff.

In this article we will:

1. See how to get the memory specs of your system.
2. How to use those specs to select RAM suitable for upgrade.

Let's go!

Chrome needs a lot of memory gif


What factors do I have to consider?

In order to make sure the RAM you buy will work, you'll have to consider the following factors:

  1. RAM capacity of your motherboard?
  2. Form factor, type, speeds, and voltages supported by your motherboard?
  3. Compatibility with your current RAM? (Type, speed, voltage and CL)
  4. And finally how much RAM do you actually need?

Let's see how to figure out all these specs and select RAM with the correct parameters!

Assembling a new PC?

Normally with a few commands you can figure out your memory specs. However if you're just assembling your PC you obviously won't be able to run commands. This case, you can go to the site of your motherboard's manufacturer and see what it supports.

Here's an example of an MSI Motherboard's details. In the DDR4 MEMORY row you can see all the frequencies supported by the manufacturer.

Anyhow, let's get this done bois' and girls!
High end pc running gif


Get RAM specs for Windows:

Start a Command Prompt, make sure you run as administrator, then execute the following commands:

  • Get memory details with the wmic memorychip command. This will print parameters separately for each RAM module installed - so the number of printed lines will tell you how many RAM modules you have installed. ```

wmic memorychip get memorytype, capacity, speed, formfactor, manufacturer, configuredvoltage

- Then **get the total number of memory slots** with the `wmic memphysical` command. Then deduct the number of printouts from the previous command from this number to get how many free slots you have on your motherboard. (Or just open your PC and see how many open slots you have left! You can also install the [Speccy](https://www.ccleaner.com/speccy) app to figure this out.)
Enter fullscreen mode Exit fullscreen mode

wmic memphysical get memorydevices


> ### Understanding the printouts:
> - *Manufacturer* is just the manufacturer.
> - *Capacity* will be the RAM capacity in *bytes* (google will convert it to GB in one search).
> - *Speed* is the RAM speed/frequency in *MHz*.
> - *ConfiguredVoltage* is the configured voltage for this device, in millivolts.
> - *MemoryType* will be a number between 0-26.
> - *Formfactor* will also be a number between 0-23.

> To figure out what these numbers mean check the official windows documentation for [Win32_PhysicalMemory](https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-physicalmemory) and search *Memorytipe* and *Formfactor*.
> Here's a short version though: *Formfactor* 8 and 12 will be the most common, where **8 means DIMM** (Dual in-line Memory Module - the long one that goes to PC's) and **12 is SO-DIMM** (the short one for laptops).
> Regarding *MemoryType*, number **24** (**DDR3**) and **26** (**DDR4**) will be the most common.

## Get RAM specs for Linux:
If you're a Linux user you've probably figured this out already but if not, you can use `dmidecode` to find all the information about your RAM:
Enter fullscreen mode Exit fullscreen mode

sudo apt install dmidecode
sudo dmidecode --type 17

Cool now we have all the specs! Let's see why they're important!
___
## Memory parameters per each
Let's see why each parameter matters and how to do the upgrade keeping these in mind.

### Motherboard Limits
> Swap or add.

You can put as many RAM modules in your machine as your motherboard allows, but the general performance will be a little bit lower the more modules you install. That's why it's better to have fewer, more powerful RAM modules than many with smaller capacity. Modern laptops and PCs usually have at least 2 memory slots.

When you upgrade you basically have 2 options: you swap or you add. If you decide to add a new memory module next to the current one make sure that all the specs align (see bellow).

Also in most machines there's a primary memory slot. It's generally better to put the module with the most capacity to the primary slot.
One thing to mention for older systems: 32bit systems can only utilize 4GB memory max. If you have a 32 bit system every memory beyond 4 gigs is wasted. 

### Manufacturer
> Buy modules from the same manufacturer.

It is said that memory blocks from the same manufacturer generally work better together. If you're installing an upgrade, or you're buying more RAM modules, try to make sure you **buy modules from the same manufacturer**.

### Capacity
> 8GB min, 16GB for work, 32GB+ for high end gaming.

This is the simplest one. Capacity is cumulative (it adds up). Also, you can **freely mix** RAM with different capacities (for example 8GB+4GB).

Question is how much memory you really need? At the writing of this article **8GB** RAM can be enough to run a PC with Windows 10, if all you do is browsing the web and reading emails.
If you want to be safe **16GB** is a good amount to do web development, or anything that requires many browser tabs to be open.
For high end gaming you should go **32GB** or more.

### Speed/frequency
> Faster is better but check motherboard compatibility - or buy the same speed your current memory has!

Generally faster speeds are better, but when doing an upgrade your goal is to **install modules that have the same speed!** (If frequencies differ, the slower can actually slow the better one down to make sure they're in sync.) Also make sure your motherboard supports the frequency of your RAM.

### Voltage
> Buy low voltage, or the same voltage as your current RAM.

There can be cases when your motherboard will not be able to operate your RAM if it requires more Voltage than what the motherboard provides. This can usually be set in the BIOS, but to avoid inconveniences make sure to buy the same voltage that your current memory has. Also lower voltage is generally better, and more cost effective.

### Memory Type
Easy. Buy what your motherboard supports/what you currently have (DDR3/4/5)

### Form Factor
Same. Buy the supported type (DIMM/SO-DIMM).

### CAS Latency
> Select the lowest latency or buy the same CL as your current RAM.

CAS Latency, or the CL number is a bit more complicated. You should generally **install modules with the same CAS Latency**! But it's not that simple to figure out what your system currently has. Here are some ways to find out your current RAM CL:
- Search the manufacturer's site, with your serial number. Here's how you get your serial number:
Enter fullscreen mode Exit fullscreen mode

wmic memorychip get serialnumber, manufacturer

- Install [Speccy](https://www.ccleaner.com/speccy) app and check it there.
- Open your machine and check on the RAM sticker (it may or may not have the CL number on it).

## Summary
> If there's more than one RAM module in a machine the following parameters should be aligned: **manufacturer, frequency, CL, voltage**.

> **Form factor, type, and compatible frequencies** are specified by the motherboard manufacturer.

![memory install](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tmori15gfdexvpb30red.gif)

## Install and Check!
If you've got the RAM that fits all the requirements, all you have to do is to **shut your machine down, make sure it's not plugged in and battery is removed**, then install the RAM.

After restarting your machine you can check if your new memory block is operated properly by your system.

### Windows
Enter fullscreen mode Exit fullscreen mode

systeminfo | findstr /C:"Total Physical Memory"
wmic memorychip get capacity

### Linux
Enter fullscreen mode Exit fullscreen mode

free -m
sudo dmidecode -t 17


Also keep in mind: if everything should be okay but the RAM is not working, it can easily be a *faulty/broken* module. It happened to me before.

**Enjoy your upgraded RAM!**
![plusone](https://thepracticaldev.s3.amazonaws.com/i/ypvzafveynm5q1njmrs3.gif)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)