Home Artists Posts Import Register

Content

Hi, guys!

In this diary, I would like to address the problem that I would always encounter in Blender, Memory Problems. In addition, I would also like to explain how we can actually use virtual memory to solve it and what are the merits of learning this besides using it for Blender.

I occasionally talk about how Blender always crashes when using it on my diaries and WIP updates. However, I finally found a really good solution to this situation. We could allocate parts of our hard drive to create virtual memory that would cache volatile data from the computer.

Definition

Virtual memory is a temporary storage for CPU process queues by using Hard Drive Space.

Merits

The merits of creating virtual memory space are to increase the memory cap required when running software, which prevents crashes.

Let's assume you have an old GPU from 2010, and you try to play the newest AAA games. Your memory graph would have looked like this.

once it hits the cap, it will terminate the process (the game) for consuming too much RAM space, which causes crashes.

Creating virtual memory increases the cap which enables you to play demanding games at an affordable cost.

What about upgrading the GPU? well, upgrading the GPU only reduces the process that goes into the RAM since it processes a lot faster.

If you value affordability, buy a Hard Drive and create virtual memory. If it is still not enough, or the hard drive cost outweighs the GPU costs, upgrade the GPU.

Use cases

The use cases of Virtual Memory are the following :

  • Having a problem with Google Chrome for consuming too much RAM, you can create more tabs by adding more Virtual memory
  • Does Photoshop keep crashing while opening/using it? Virtual memory can solve this problem and prevent crashes
  • Have a bad Graphics card while wanting to play AAA games? Virtual memory can stabilize the process input to the GPU and RAM which would eventually prevent crashes.

How does virtual memory work?

To understand how virtual memory work, we need to understand how our computers work.

  • A user gives input to the computer using a mouse, keyboard, or other devices
  • This input request then gets converted into a process by the CPU
  • The Process usually explains to the CPU which hardware is going to be responsible for processing the request, is it the CPU or the GPU
  • If it asks to be processed by the GPU, then the CPU will send a new request to the GPU, which details the process needs
  • While waiting for the results, the CPU then sends the process to a volatile storage device to be stored
  • If the GPU finally finishes the processing requests, the CPU will send the results to an output device, whether it is a monitor, speaker, or printer.
  • The process is then terminated to make way for other processes once it is done

Volatile Storage Device

This is usually divided into 3 types

1. CPU Cache 

is a volatile storage space that existed in the CPU. 

It has 3 layers, L1, L2, and L3 respectively.

Processes stored on L1 gets processed first, then L2 and L3 respectively

If the CPU cache is full, the process will be sent to Random Acess Memory

2. Random Access Memory

Random Access Memory (or RAM) is hardware specifically designed to handle idle processes until the CPU requested the process to be processed.

RAM is created because using chips/capacitors to store data temporarily is faster to retrieve than using a magnetic disk (Hard Drive)

It is designed as a cost-effective solution to store processes while maintaining the affordability of computers (RAM is more expensive than a hard drive)

If the RAM is full, it would usually terminates related processes to make space, which leads to software crashes

However, if the RAM is full, and we have virtual memory, the process will be sent to the virtual memory instead

3. Virtual Memory

Virtual memory is the last volatile storage that can be utilized by the CPU

It uses a certain space in a magnetic disk (HDD) or chips (SSD) to store processes

During the early days, Virtual memory is discouraged to be implemented because it could cause damage to the device.

Imagine having a paper and you write something and erase it in the same spot. eventually, the paper will break.

RAM stores its process using energy from the computers. In contrast, Hard Drives stores data by "writing on the paper".

However, technological progress has made hard drives more resilient toward rewrites. Thus making Virtual Memory more accessible.

How to create virtual memory (Windows)

Go to Explorer -> This PC (Right Click) -> Properties

Go to "Advanced System Settings" on the right side of the window

Once in system properties, go to advanced->performance->settings

go to advanced->virtual memory->Change

set the hard drive that you would like to allocate. Choose "Custom Size" and insert the amount of allocated storage designated for virtual memory. Click set, ok, and restart the computer.

Finally done. We have created a virtual memory. Now your apps are more resilient against crashes and you can sleep well knowing that you don't need to worry about any unsaved projects.

Checking Hard Drive Anomalies/Damages

To check any damages to your hard drive in Windows, go to the command prompt and type:

wmic diskdrive get status


Files

Comments

No comments found for this post.