Welcome, Guest. Please login or register.

Author Topic: Do computers need RAM  (Read 1171 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline Hattig

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 901
    • Show all replies
Re: Do computers need RAM
« on: November 04, 2015, 09:44:08 AM »
Accessing SSD is still slow, especially from the point of view of a CPU.

A CPU's L1 cache might have hundreds of GB per second of bandwidth, and very very low latencies (4/5 clock cycles for Intel's Haswell). The L2 cache usually has lower latencies, but is far larger (more dense logic design). Many CPUs have L3s and even L4s as well, which are more of the same - trading some bandwidth and latency, for capacity.

Main memory takes this further - it has tens of GB per second of bandwidth (HBM is a different beast, let's not talk about it) but the latencies are simply not great. We're talking 10s of nano seconds here - both in working out we need to access memory (36 cycles) and accessing the memory itself (57ns for Intel's Haswell coupled with PC3-12800 cl11 cr2 memory). CPUs have complex memory prefetcher logic to guess what memory is needed and they pre-load it into the CPU's caches. Modern systems will treat main memory as a cache of the system's full virtual memory space, which may be backed by disk. Look up the page fault penalty to see how damaging having to access even slower memories is.

And SSDs are a few orders of magnitude slower on top of that, and bandwidth limited (single GB/s at best). And HDDs are orders of magnitude slower still.

So the problem is dataset size. Clearly a text document still doesn't have a large dataset, even if it's using UTF32. However most applications aren't working with text documents. They're working on very rich documents or videos. And the system has a lot of apps open at the same time, each having a complex document - and those documents have rich media (large images, videos, etc) as well.

http://www.7-cpu.com/cpu/Haswell.html

So maybe you're not asking about modern systems, but asking if on an old system we could get away with using an SSD instead of memory expansions.

The answer is still no! Amiga Fast RAM has latencies greater than modern memory, but a lot of modern memory's speed and bandwidth is achieved by trickery, it's not actually a lot faster. IIRC Amiga RAM started off around 240ns and probably got that down to 60-80ns in the A4000.

SSD latency is still higher than that. Bandwidth is not a problem, but it's still too slow to access initially. There may be ways to fudge it, but that will probably be leveraging the SSD's fast memory cache (128MB, even 512MB). Which is memory!