3

I have been taught in Memory hierarchy we have RAM to get rid of bottleneck of HDD as they are very slow being a mechanical devices. Since CPU are very fast and to maximize their use we have RAM (Then cache).

Now instead of HDD we use SSD which are electronic devices that work much like RAM as explained in this article.

My question is if SSD are like RAM then why isn't RAM replaced with SSD ? I can see the benefits of no overhead of memory techniques used to communicate between RAM and SSD. Also CPU can directly communicate with SSD without overhead of first accessing RAM

Ahtisham Chishti
  • 151
  • 2
  • 3
  • 10

2 Answers2

6

SSD is not like RAM. There are a couple of very important differences -

  • SSD's have a limited number of writes, and really need to be written in blocks. There is a whole lot of abstraction to provide more writes by hiding blocks as they go bad. (Thats what TRIM is all about for a start). If SSD was used like RAM it would die very quickly.
  • While SSD's have a much lower latency and higher speed then hard drives, they are still much, much slower then RAM.
  • Most SSDs are not random access, but block structured, like disks. You can't read or write one byte, you have to use a whole block.

As @PathToLife indicated, it is quite practical to use high speed SSD as a cache to extend RAM. Until they discontinued it, Intel offered something called "Optane Memory" which was, in effect, a high speed SSD used as cache.

Related to your query - back in 2014 HP was working on what was going to be a revolutionary new a system which used non-volatile memory as RAM. Google "HP The Machine". They were looking at using a novel technology called memristors, but it didn't pan out for them.

user10489
  • 2,081
davidgo
  • 73,366
5

TLDR;

SSDs still aren't as Performant as RAM for the Insane Data manipulation speed of today's CPUs.

It would be possible to use SSD as RAM - for a potato PC or mobile devices - with a few architecture changes regarding security as there's no more volatile storage. As @user10489 pointed out, SSD as RAM is quite limited in practicality, and not possible currently for modern day computers (as of 2022) - would have to be a custom architecture.

There has been research into non-volatile-random-access memory, but any meaningful impact may be 5-15+ years away.

Fun fact: We do move stuff out of RAM onto the SSD if the RAM is too full, it's called PageFiles! MacOS and Windows have been doing this for years. But accessing the SSD pagefile is still not as good as RAM.

RAM requires in particular

  • Super Low Latency
  • Insane amounts of writes / rewrites / read (More than what SSD flash can handle)
  • High Average Bandwidth (Data transfer speed) 51.2 GBs DDR5 vs 7GBs NVME SSD
  • Low Random Data Access Latency (Data operation speed) IOPS..
  • Consistently in performance (SSD has operations that may drop performance. e.g TRIM)
PathToLife
  • 1,146