Why use RAM in a computer

Memory hierarchy: finally understand why a lot of memory / RAM is so important in a computer!

Reading time approx. 8 minutes

RAM & Co: Introduction to the memory hierarchy / memory management of a computer / PC

Table of Contents

Storage types an overview

In order to understand why it is so important to have a lot of main memory / RAM in a computer (especially PCs & notebooks), one cannot avoid a basic understanding of the types of memory, the so-called memory hierarchy and the resulting memory management. Because there are several types of memory in your computer, all of which have very different speeds. A distinction is made between that Cache, the Main memory and the so-called Secondary storage. These types of memory are hierarchically created and are organized accordingly by the memory management of your operating system, e.g. Windows 10.

What is the main memory?

In contrast to secondary storage, which includes a computer's hard drive or SSD in particular, a processor can access what is known as main storage directly. This type of storage is called main memory or RAM (Random Access Memory). It is a "volatile" type of memory. This means that information (in contrast to other types of storage) can only be stored as long as power is applied. If you switch off your computer, all data in the main memory will be lost suddenly.

A buffer memory (cache) and the CPU register are used between the actual processor and the main memory. These two types of memory are considerably faster than your computer's RAM. The main memory, on the other hand, is many times faster than the secondary memory. This means the built-in mass storage device in your PC or notebook. So the classic hard disk (HDD), an SSD or a hybrid solution) SSHD.

If you want to find out more about mass storage, please read our article: SSD, HDD or SSHD: Modern mass storage in comparison.

So there is one between these types of storage so-called storage hierarchywhich is defined by the speed, but also by the size / capacity of the memory. Let's take a closer look at these types of storage:

Memory types (PC, notebook) at a glance - RAM is much faster than an SSD


back to the table of contents

Relationship between processor, RAM, cache and mass storage in the computer

How do the storage types actually work together in the storage hierarchy?

Let's take a closer look at the matter. When you run a program, the processor / CPU takes care of calculating all the necessary steps. The main processor now processes the amount of instructions and data that arise one after the other.

And it gets these instructions and data from the memory of the computer system. The ideal state would be a really large memory that is just as fast as the fastest memory of the CPU itself (which, as mentioned, is extremely fast).

Unfortunately there is one problem. That would be priceless. Therefore, the memory of the processor itself (CPU register and subsequently the processor caches L1 & L2 and L3) are also quite small. We're talking from a few kilobytes (L1 cache) to a few megabytes (L2 / and L3 cache). Keeping all important data and instructions in this fast memory for the processor is simply impossible because of the very low capacity.

The speeds within the storage hierarchy - the access times of the main memory / RAM downgrade even the fastest SSD

Storage typespeed
CPU registerextremely fast: access times are less than a nanosecond *
CPU cacheextremely fast: access times of only a few nanoseconds on average *
random access memorymoderate access times of around 60-70 nanoseconds *
Secondary storage (SSD)slow access times of around 0.4 milliseconds *
Secondary storage (HDD)very slow access times of around 8-10 milliseconds *

* Times are guide values ​​- but correctly reflect the differences in the speed of the storage types in relation to each other. Even if two different SSDs have different speeds in comparison - even the fastest SSD does not even come close to the access times of the main memory!

back to the table of contents

Memory - RAM is your computer's workhorse

That is why there is random access memorywhich is also called RAM. In the memory hierarchy, this type of memory is located directly below the processor's caches. In comparison, it is much slower, but it has a much higher capacity. Therefore, your computer keeps the majority of all data that your processor has to process and that would immediately overload the buffer memory here. Your processor can access the main memory directly, which has a significant performance advantage. If, however, the main memory runs out during operation, i.e. is insufficiently dimensioned, very important required data is also stored on the next lower level in the memory hierarchy.

This is usually the built-in one Mass storage, i.e. the hard drive / SSD (also called secondary storage) of your computer. Well, and here you have to be very clear: the speed is on this level again DRASTICly slower, than when data are read from the RAM / main memory.

back to the table of contents

Memory / RAM vs SSD / HDD - the speed differences

The hard drive / SSD slows down performance

To make it clear based on the access times of the various storage types:

The access time to the main memory is around 70 nanoseconds. With a really fast M.2 SSD on the market, the Samsung 970 EVO (PCIe), it is about 0.02 milliseconds. This is an incredibly good value for a mass storage device. But that's still 20,000 (!) Nanoseconds. Access to the main memory is still 285 times faster!

Impressed? Then we have a nice number for you. Because it gets really dark with the good old hard drive (HDD). Here the average access time is around 8 milliseconds, which corresponds to 8,000,000 nanoseconds. RAM is faster here by a factor of 114,285!

So you see: memory types differ considerably in speed from one another!

>> Is the article helpful? About a "I like it" on facebook we would be very happy <<

So if your processor has to "serve" itself from there for its next most urgent calculations within the memory hierarchy, then your computer will suddenly act agonizingly slowly. Because even an SSD is a very slow memory from the point of view of a processor. And even worse: the CPU cannot access the secondary memory directly either. It must be addressed indirectly via the input / output channels of the computer. This leads to a further bottleneck and thus to a delay in the calculations.

So if the size of the working memory / RAM is too small, then a drastic slowdown of your computer is the logical consequence and also has a noticeable negative effect in practice.

So let's keep it simple: there is a memory hierarchy. Ideally, all important processes would be kept in the fastest memory for the calculation. But that is not possible. This means that another storage facility that is as fast as possible is necessary, but it must remain economical, i.e. affordable. And this memory is the main memory (RAM) of your computer / notebook. Ideally, this should be so large that as little data as possible from the processes to be processed, especially data with high priority, have to be swapped out on the hard disk / SSD.

Storage hierarchy of a notebook / PC

The relationship between storage management and storage hierarchy

Or: The reason why you can never have enough memory / RAM

You have learned that during the work processes of the computer, data is stored at various levels of the storage hierarchy. The processor then accesses these directly (main memory, cache or CPU register) or indirectly (Mass storage:SSD, hard disk / HDD, SSHD). How quickly this data reaches the processor is decisive for the performance of the overall system. If you have too little memory, there is an unnecessary bottleneck! Specifically, this means that the processor must first wait for the data. The entire system therefore comes to a standstill, the computer is felt, as is also measurable in concrete terms, slower.

The so-called memory management takes over the organization of this data. This is part of your operating system (e.g. Windows 10). It decides how, when, where, in which order and to what extent data is stored within the storage hierarchy.

The goal of intelligent and effective storage management is to place all data as cleverly as possible and high up in the storage hierarchy. And of course to make room again. For example, if you close a program, memory management releases parts of the previously used memory space.

back to the table of contents

The mistake of static memory management / RAM organization

These processes are highly dynamic. A big, prevalent mistake is to assume that a program X is always allocated a certain amount of working memory. And this regardless of the amount of memory that the memory management finds on your PC.

An example:
Let's assume you have 8 gigabytes of RAM and see that a program, for example Photoshop, uses 1 gigabyte of RAM. Then it would be a mistake to believe that it is the same with 16 gigabytes.

Depending on how much memory is available, the memory management acts very differently. It reacts dynamically. If the memory management notices that a lot of RAM is available, it behaves accordingly and is much more “generous” than if little RAM is installed. For example, processes that would have been written to a lower level of the memory hierarchy at 8 gigabytes are now also kept in the main memory by the memory management.

Programs are also given significantly more memory in RAM. Much larger, inactive parts of the operating system are loaded into the main memory. All of this leads to an ever higher performance of your computer. The point in time at which you have to close an open but not currently used program because the computer is slow is getting further and further into the distance.

back to the table of contents


>> Is the article helpful? About a "I like it" on facebook we would be very happy <<

Correctly interpret the memory requirements of your computer, for example under Windows 10

And so it happens that a system that is upgraded from 8 gigabytes to 32 gigabytes, for example, may already occupy 6 gigabytes of RAM after the first start, quasi in idle mode. After the first start of a demanding program, for example Photoshop, the Task managerYour computer even says 10 gigabytes as being used. That doesn't mean that the program or Windows 10 are so demanding and simply require a lot of memory. Rather, it means that the CPU can now access significantly more data directly from the fast RAMthan would have been the case with half as much memory. This is because the memory management decided this in view of the size of the available memory.

The result: your computer becomes faster and loses performance less and less often, even if many demanding programs are open at the same time.

In theory, therefore, there is actually no such thing as “too much” working memory. This is especially true if you have one PC for image processing, Video editing or CAD applications. More RAM always means higher performance of your computer. In practice, however, you naturally have to weigh up the benefits and costs. Depending on the area of ​​application of your PC, a certain amount of RAM simply makes no economic sense anymore.

The more memory (RAM) you have, the less often - possibly never - your PC will slow down just because you have many applications open at the same time. Among the memory types, the main memory is therefore one of the most important representatives within the memory hierarchy

back to the table of contents

When does it make sense to upgrade the RAM in the computer?

To put it bluntly: as soon as you feel stress. Typical signs of a memory bottleneck are:

  • Your programs run quickly after the start, but later they run slowly
  • If you still have an HDD installed, you can hear it working all the time
  • Once you have a certain number of applications open, your computer will slow down. If you close some programs, the computer will respond more smoothly
  • You will receive feedback from your computer when an action is taken; "Not enough memory"
  • You can see in the course of the Windows 10 Task Manager that your RAM is very often used at over 70-80%
  • Your computer is sometimes so sluggish that you can only restart it

How much memory / RAM is enough?

It actually depends a lot on what you ultimately want to use your computer for. 8 gigabytes of RAM are absolutely sufficient for the use of office applications, even in a professional office environment. But if you have a PC for image processing, Video editing or even for CAD applications, you may only be happy with 16, 32 or even more memory.

The following article deals specifically with the question of how much RAM makes sense in practice:

RAM: How Much RAM Do You Really Need in 2021?

Conclusion - Better to have too much RAM in your computer (PC / notebook) than too little!

Within the memory hierarchy, the main memory plays the most important role within a computer system among the types of memory. Your computer's memory management will find a type of memory in it that is sufficiently fast and has a comparatively high memory capacity. The buffer memories of the CPU and the CPU registers are much faster, but have only a minimal storage capacity.

The secondary storage (SSD / HHD), on the other hand, is much slower than the main storage / RAM. You should therefore avoid a shortage of memory at all costs. The fastest processor is of little use to you if it has to wait too long for data. You can't really have too much memory. The advantage of a lot of RAM becomes less and less noticeable, however, the more undemanding your computer applications are. Whether you have a PC with 4 gigabytes of RAM or with 32 gigabytes of RAM, for example for word processing, basically makes no difference.

back to the table of contents

Questions and tips about memory

Short answer: 16 gigabytes of RAM / main memory will also form the optimal basis for a modern computer system on which the latest software should run in 2021. It doesn't matter whether you buy a new computer or use an older device.

Provided that the storage prices are still low, the price-performance crown will start in 2021 32 gigabytes of RAM.
Yes, you can. You can also mix different RAM bars with different sizes - with one exception: ECC memory cannot be combined with normal RAM bars. However, mixing different RAMs does not make sense. The entire RAM then only runs as fast as the slowest bar, and such a configuration very often leads to stability problems.

The ideal configuration therefore always consists of two identical RAM bars.
His size. The more memory you have, the smoother your system will be, even if you use many programs at the same time.

Especially with modern systems based on processors of the Ryzen series from AMD, the importance of the speed of the RAM is increasing again significantly.

Our tip: Use as much memory as possible, but not at any price. Your RAM should already have a medium to higher speed.
The size and the speed of the main memory really have a significant influence on the overall performance of your PC / notebook. In addition to the processor and the mass storage device (HDD or SSD) used, RAM is one of the three most important components of a high-performance computer.

Additional links on the topics of RAM, memory management, memory types and memory hierarchy

Used PCs & workstations with a lot of RAM
Used notebooks with a lot of RAM

Wikipedia entry access time of storage types
Wikipedia entry memory management
How to call up the Windows 10 Task Manager (chip.de)
Wikipedia entry on DDR SDRAM
Wikipedia entry RAM

You might also be interested in:

RAM - how much RAM do you really need in 2020? A guide

 

PC for image processing & media design - avoid bad planning when buying

 

SSD vs HDD vs SSHD - Modern mass storage devices in comparison

 

Used business notebooks from the dealer - buy cheap with warranty

The four biggest misconceptions about putting together a personal computer for photo editing

My first computer was an Atari STE in the 80s. The processor clocked at a fabulous 8 MHz and the computer also had a whole megabyte of RAM! The entry into the world of PCs then followed with a 386 with the DOS and Windows 3.0 operating system.

Since then the fascination for computers has not left me and over the decades I have accumulated a broad knowledge in the IT area.

Since 2014 I have been responsible for the visual appearance and product photography of the computer retailer harlander.com across all media. And that with enthusiasm.

I also write for our blog. My focus is on questions of hardware and image processing, as well as the topic of refurbished IT.