What is virtual memory


Just found the RAM plus setting on my phone and dont get how it works, what does it do and what do I set it to

In: 2

Virtual memory is used for swapping stuff out of the main memory for not in use stuff, like apps that are open but not used, etc.

RAM is expensive. Mass storage (hard drive/flash) is relatively cheaper. You typically have at least an order of magnitude more mass storage than RAM.

Virtual memory is where you usemass storage as RAM. This gives your computer device virtually as much RAM as you need. The downside is that mass storage is MUCH slower to access than RAM.

When you run out of RAM, the CPU may move a portion of RAM not currently being used to this virtual RAM space–freeing up some real RAM. If the CPU needs access to something it put in virtual RAM it will move something not immediately needed into virtual RAM and replace it with the needed data from from the virtual RAM. As long as virtual RAM access is only occasional, this will be relatively transparent to the user. If heavy access of virtual RAM is required, then your computing device will noticeably show as your CPU swaps data in and out of virtual RAM.

Virtual memory means that the system is running low on available ram (actual memory) and is using part of the storage (hard drive) as if it were additional memory. Using virtual memory comes at the expense of speed as RAM chips are significantly faster than swapping things in and out of the storage drive.

It is when the active RAM gets temporarily stored on the harddrive. This allows the computer to use the RAM for another task but quickly load up what you were working on earlier.

Imagine you have 16 GB of RAM, and are using a big photoshop image that is using 15GB of ram. You take a break and open up Chrome, which uses 14GB of ram. The computer stores your photoshop file temporarily on the hard drive so Chrome can use the RAM. When you go back to photoshop, it can simply pick up where you left off quickly.

There are 2 types of storage for a computer/phone.

First, is memory, or RAM. The key thing with RAM is that it’s very quick. The downside to RAM is it is expensive to make $-wise, and when you turn off the power, the contents are lost. Computers use RAM to store short-term stuff, like the contents of a text box, or the picture of the Reddit robot while doom scrolling.

The second type, is non-volatile data storage, which used to be called hard disk space, or disk space, or storage. Those terms don’t really apply anymore as technology has moved away from spinning magnets, to flash memory, and stuff I’ve never heard of before. But the key feature is it’s cheap (relative to RAM), and it sticks around after you turn off the power. This is for your permanent stuff, like music you want to listen to while offline, selfies, or your taxes.

Sometimes, if you’re doing a lot of stuff, like looking at pictures of HD cats, while downloading spicy videos, at the same time as you’re calculating your taxes, your computer/phone needs more RAM than it physically has.

Virtual Memory uses your non-volatile data storage to act like RAM. So the temporary variables are stored long-term on your hard disk, or whatever tech you have. This is slower than using actual RAM, but it lets you keep working instead of forcing your system to crash or force you to close some windows.

In general, you should leave the factory default settings.