eli5 Why do pcs need ram, when you can just use your ssd as one

206 views

It’s a common knowledge that computers run on rams, any application run on a pc is temporarily stored in the ram. So why can’t we just dedicate 32Gbs of ssd storage to ram and have our pcs run on it? That way one could have a 256Gbs of ram easily, without the need of the ram sticks and for so much cheaper.

In: 0

6 Answers

Anonymous 0 Comments

You can do that. You just don’t want to. Ssd’s are much slower than even old RAM. Since the CPU needs direct access to the RAM this sacrifice in speed would drastically slow down the computer.

Anonymous 0 Comments

If there isn’t enough ram, then that’s exactly what happens. The problem is that SSDs are much, much slower than RAM.

RAM has a speed of something like 20,000 MB/s (varies significantly), while SSDs are more like 500 MB/s. Even more importantly though is that RAM is particularly good for *random access*, and hence is good at switching between different sections without too much delay.

Anonymous 0 Comments

Two big reasons:

The first is speed. RAM is much faster than an SSD, something like 20-80 times faster. Since storing and retrieving data is so integral to the function of a computer trying to use an SSD exclusively would make your computer agonizingly slow even if you can make it work. Any savings on RAM would be outweighed by crippling the computer as a whole.

Second, SSDs wear out. Their method of storing data without constant power input will gradually degrade the storage and it will go bad. Drives automatically spread out which cells are used so they wear evenly and gracefully, but the number of cycles is limited. RAM is designed to constantly change its contents so while it can’t store data without power it will wear down much less per cycle. You would be prematurely wearing out your SSD and that would outweigh just using RAM in the first place.

Anonymous 0 Comments

RAM is significantly faster to access.

NVME drives have a max transfer speed in the realm of like 7-8 Gb/s

DDR5 RAM is 50+ GB/S per module (consumer is typically two channels)

While new modern NVME drives are faster than really old RAM, equivalent technology levels will always have storage slower then memory, and memory slower than cache.

To use a nice real world example, Storage is all the paperwork you have in your filing cabinet, RAM is all the paperwork that can fit on your desk. It’s way faster to access the stuff on your desk, but it also can’t fit nearly as much as a filing cabinet.

Anonymous 0 Comments

SSDs are stupid fast compared to hard drives but slow compared to RAM

RAM has access times around 10 nanoseconds. SSD access times are 25,000-100,000 nanoseconds

For scale, that’s the difference in time between something on the table in front of you and having to get it delivered next day.

Think about cooking dinner and how it would kill your cooking speed if you could only have 4 ingredients out and everything else was 24 hours away. The long access time would result in huge down times for the CPU and crush performance. We have 3 layers of cache, and then RAM to try to hold data in use as close to the CPU as possible to minimize access times and therefore time the CPU is waiting

Anonymous 0 Comments

A top of the line NVMe SSD does something like 4GB/s with a read latency (time between command given to start a read operation and data getting back) of ~300 microseconds. My (out of date DDR4 of middling performance) RAM has a read performance of 41GB/s and a read latency of 80.6 nanoseconds (0.86 microseconds, 300+ times less). Remember that 1 nanosecond = one cycle at 1GHz, 5 cycles at 5GHz (the speed of a brand new high end CPU). Even at 80ns that means reading from RAM equals your CPU not being able to do anything for hundreds of cycles. At hundreds of microseconds, reading from an SSD would punt your performance back to the 90s era.

The L3 cache of my CPU, a few megabyte memory directly on the CPU for stuff that even RAM would be slow for, has a read speed of **390GB/s**. L2 cache, 710GB/s. There is an even smaller and faster L1 cache but I only have the trial version of AIDA64 and it blanks out that stat – it does show that it has a latency of 1.1ns, 80 times faster than my RAM.

Do you get why SSDs make lousy operative memory now?