Difference between virtual RAM and RAM

Hello everyone,

What is the difference between virtual RAM and RAM and how exactly can I understand this?

HTOP

CheckMK statistic

Rules

I don’t understand exactly what I need to configure.
The utilization in HTOP reflects the value that I entered in the RAM monitoring. That fits. What about the virtual RAM and how can I deactivate it accordingly?

The virtual memory is the sum of the installed RAM and the available swap:

> Total virtual memory: 38.93% - 6.76 GiB of 17.4 GiB
> RAM: 43.60% - 6.70 GiB of 15.4 GiB
> Swap: 3.07% - 62.9 MiB of 2.00 GiB

If you have no swap, as it appears in your case, the virtual memory is equal to the installed RAM.

In your case, the memory check notifies you that the OS has committed 120% of the available 957 MiB RAM + swap. This is not really a problem as long as not all processes actually request the reserved RAM.

A Linux system can (and does, by default) overcommit memory. This means that processes can acquire more memory than they actually need. Linux commits these requests, but does not reserve a physical memory segment unless the memory is really used (e.g. a write request to that memory is made). It is quite a common pattern in Linux/UNIX software to acquire memory which is never used.

If you want to switch off the committed check set “Upper levels for Committed memory” to “Do not impose levels”.

1 Like

But how can the virtual memory be higher than 1 GB if the installed RAM is 1 GB and there is no SWAP?

In your screenshot only the committed memory is higher than 1GB. The virtual memory is 957MB in the screenshot.

3 Likes