Question about RAM usage

Lucas Rey

Well-Known Member
May 18, 2018
40
26
58
51
Dear community, could someone please explain such RAM beahviour?
From GUI I can see:

Immagine 001.png

While from CLI:
Code:
# free -h
               total        used        free      shared  buff/cache   available
Mem:           125Gi        97Gi       3.5Gi        51Mi        25Gi        28Gi
Swap:           39Gi       7.5Gi        32Gi

What is the trusted source for free mem? And what is not clear to me, is why the used memory is the same, but "free" indicates 3,5Gi whoile should be about 28GB? Basicalli with is the difference between free and available?
Proxmox is not installed using ZFS, btw.

Thank you
Lucas

EDIT: Oh OK! this is the right way:
1714123045601.png
Free memory is the amount of memory that is currently not used for anything. For this reason, especially on servers, I like to consider free memory as wasted memory. Once your applications/processes have launched, and considerable uptime has passed, this number should almost always be small.
Available memory is the amount of memory that is available for allocation to new or existing processes. Available memory is then an estimation of how much memory is available for use without swapping.
The difference between free vs. available memory in Linux is that free memory is not in use and sits there doing nothing. In contrast, available memory is used memory that includes but is not limited to caches and buffers that can be freed without the performance penalty of using swap space.


Still need to understand the use of the cached mem that is the one who tooks the free mem space
 
Last edited:
Code:
# free -h
               total        used        free      shared  buff/cache   available
Mem:           125Gi        97Gi       3.5Gi        51Mi        25Gi        28Gi
Swap:           39Gi       7.5Gi        32Gi

What is the trusted source for free mem? And what is not clear to me, is why the used memory is the same, but "free" indicates 3,5Gi whoile should be about 28GB? Basicalli with is the difference between free and available?
Free memory is unused memory (3.5Gi). Available memory (28Gi) is memory that can be used for new process/VM/etc., which is the sum of free memory (3.5Gi) and memory that can instantly be make free for reuse aka buff/cache (25Gi).
Lots of operating systems don't memory filesystem cache as used memory but as free instead. This confuses people a lot and a "explain the different memory usages" question is asked every week on this forum.
 
  • Like
Reactions: Lucas Rey

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!