Using an SSD as RAM in a PC is a tempting idea: RAM has a fairly high price per GB, and it makes sense to ask what would happen if we replaced it with SSD memories, which are much faster.
Obviously, if it were feasible to replace the RAM with an SSD, it would already be done, but it is a simplistic conclusion.
The matter really requires a little more analysis, and that is what we are going to here!
Why not use the SSD as RAM?
We are going to start by looking at the reasons why it would not make sense to replace RAM memory with an SSD.
Speed and Location
First of all, an SSD is considerably slower than RAM. A normal speed DDR4 memory can exceed 25,000 MB/s peak speed, while a normal SSD (SATA) will be around 500MB/s, and even an extremely fast SSD will be well below 10,000MB/s.
See Also: Is SSD Good for Gaming
This is an incredible disadvantage when it comes to running a PC, due to the huge number of transfers that occur continuously in RAM memory.
This slowness would be very noticeable in the performance of computers.
Precisely, much higher speeds are needed than RAM currently has, due to the so-called performance hole between processor and memory, since CPUs have increased performance much faster than RAM memories. You can’t go back!
Another issue is the physical location of these memories in a PC. On a motherboard, the RAM memories are always right next to the CPU.
To manage the RAM, an interconnection that is as reliable as possible is required, to avoid PC stability problems. Running shorter data tracks helps a lot to achieve this stability.
The Memory Hierarchy
Another important factor that why RAM cannot be replaced by an SSD is that a computer’s memory follows a hierarchical organization, in which we have a pyramid of memory types: as we go up the pyramid, there are memories with less capacity and more expensive, but also faster.
Thus, all the memory transfers that are made will go from a specific point of the pyramid to the top.
CPU registers an incredibly fast and small type of memory and we all know about it (since its management depends on the CPU and not the programmer).
This is how we can leave different files in different types of memory that we think we are going to use repeatedly.
We don’t have a constant access to the SSD or HDD, and this may slow down the file transferring process as well.
Using an SSD as RAM means doing away with this concept, which over the years has proven to be fundamental and effective.
Difference in Approach
NAND flash and DRAM are thought of in radically different ways, each being fit for purpose, and nothing more.
As you know that RAM is volatile memory. This means that when the power is cut off, they completely erase their information. Instead, an SSD seeks to store it in more or less permanent way.
The issue here is that RAM is volatile precisely to allow high speeds, which is necessary for PC users.
If you wanted to reduce that volatility, you could change the working principle of the memories a bit, but it would mean increasing the time it takes to change a bit from one state to another, and reducing the speed.
However, SSDs are getting faster and could reach DRAM speeds. But it would still be an unfeasible approach, and the reason is the following: durability.
Another absolutely fundamental factor is the durability of the memory. SSDs have a limited number of writes, and if it is exceeded, they simply go into read-only mode to avoid completely breaking the memories.
Normal users take years and years to reach this limit, but if we were using the SSD as RAM, I assure you would get there very quickly, who knows if it was a matter of a few weeks or months.
And in a RAM memory, there are constant writes, entering and removing data without stopping during all the time something that does not affect this type of memory.
“DRAM memory works by charging (bit 1) and discharging (bit 0) small capacitors, and maintaining power while the computer is on.
If the power goes out, they will all be discharged. The advantage is that there is no wear and tear and can be used for decades.”
On the other hand, an SSD gives us exactly the opposite, it imposes a write limit on us so that the information lasts over time.
Can we Use SSD as RAM
For someone to think about the possibility of replacing normal RAM with SSDs is a totally reasonable idea, in fact, Intel has already worked on something very similar.
You are probably familiar with Optane memories, which were SSDs used as cache for traditional mechanical hard drives.
This idea is dead now, Intel has developed Optane Persistent Memory (PMem), which basically consists of Optane memories in DIMM format.
Optane PMem acts as a bridge between memory and SSD, sitting in the middle of both in the memory hierarchy.
With a speed and durability superior to SSDs, and a cost per GB that is much lower than RAM, it allows significant increases in server performance, especially for big data applications, artificial intelligence, etc.
See Also: Different types of SSD Drives
Come on, they are not replacing traditional RAM with SSD, but they are giving it a similar use.
How to use an SSD as RAM
Be very careful, it does not make sense to replace the RAM with an SSD, and also SSD cannot be used as RAM.
Basically, when the operating system runs out of RAM memory to allocate, what it will do is take advantage of the disk (in our case the SSD) to use a portion of it as a RAM.
All the portions of RAM that have been used less or are believed to be used less will be saved, to focus on all the available main memory.
This is known in different ways depending on the operating system, but in Windows it is called a page file and is a fundamental component of the OS. All of this is known as virtual memory and is used almost all the time.
For example, we see in the Windows task manager how a computer with 16GB of RAM has as “confirmed” 11.4GB of 19.7GB of memory.
Almost 4 GB that we see additionally come, neither more nor less, from the paging file, so that:
- 4GB refers to what we are using both in RAM and in the paging file.
- 7GB refers to the full capacity that we can allocate in the system, including the physical RAM and the paging file.
If we look closely, it is seen that even without full RAM the paging file is being used. So yes, using SSD as RAM can make sense, but only in an ancillary way.
We need paging file for programs in use. We will notice an incredible drop in performance. For example: we fill up the RAM, the paging file starts to be used and the performance drop is worrisome.
Modifying the Paging File Size
The paging file is totally modifiable: we can define if it is the system itself that assigns it a size, if we want to give it an exact size, or if we simply want there to be no paging file. We are going to show you here how to modify this.
The first thing we must do is access the equipment properties. To do this, go to the file explorer, and right click on the computer, and then on Properties. Here you can also access if you search for “About” in the start menu.
Once there, scroll down and go to Advanced system settings. A window will open in which we are interested in the Advanced Options tab, and within it the part that says Performance.
When you locate it, go into Settings, then Advanced Options, and finally you will have the Virtual Memory section. There, click change.
Lots of steps, right? Well, fortunately you are already in the window that interests us the most. Here we can do several things:
- See the recommended and allocated paging file values. We are given a minimum of 16MB, a recommendation of 2.9GB, and currently have 3.9GB of paging file allocated.
- Modify everything related to the paging file.
Later, you must uncheck the Automatically manage paging file size for all drives option, and you will be able to change the values. What you can do is:
- Separately define how the paging file will be on each storage unit that you have connected to the system.
Indicate how the paging file will be for each of these units:
- If you will have a custom size with a defined minimum and maximum.
- If it will be the system itself that freely decides the size, as we have seen it has not taken a large part of the disk.
- Or, naturally, if we don’t want a paging file.
Once you have decided how the paging file will be, click on Set and then you can click OK on everything.
RAM memories are priced per GB much higher than SSDs, which are the fastest storage units that exist. So, with the increasing need for RAM, it makes sense to ask: could an SSD be used as RAM?
Could we replace these expensive memories with flash chips from an SSD? The answer is no, and it is due to several reasons that we have analyzed in the article:
- The speed of a DDR4 RAM memory is up to 50 times higher than the SSD. All this in a context in which we need even higher speeds in RAM, something that DDR5 comes to solve.
- They are memories designed for totally different uses, RAM achieves that speed thanks to being a volatile memory, while the stable storage provided by an SSD has absolutely no utility to be used as RAM, and hinders performance.
- Durability is perhaps the key point. RAMs are being written to constantly, in volumes radically larger than those SSDs. The latter have a defined write limit, and if they were always used as RAM, it would be reached very quickly.
Precisely, an example that can serve to explain why it does not make sense to use an SSD instead of RAM is the fact that good SSDs have RAM inside, since it is necessary to increase performance.
See Also: Uses of an SSD Cache
However, as we have indicated in the article, there is a use that is given to SSDs as RAM: to be virtual memory.
The operating system can save in a region of the SSD (page file in Windows) data that comes from RAM, either because it considers will not be needed soon, or because the RAM space has been filled, and in this case, it would be using the SSD as a RAM.
Precisely when that happens, you notice a huge drop in the team’s performance.
We’ve also looked at the case of Intel Optane PMem, which are special SSDs used as a buffer layer between RAM and SSD, providing faster speed and durability than SSDs, at a lower price per GB than RAM and are used to speed up servers.
Zahid Khan Jadoon is an Interior Decorator, Designer and a specialized Chef and loves to write about home appliances and food. Right now he is running his interior designing business along with a managing a restaurant. Also in his spare time he loves to write about home and kitchen appliances.