LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-05-2023, 09:45 AM   #1
james000
Member
 
Registered: Sep 2018
Posts: 143

Rep: Reputation: 2
How available memory is showing up on Centos?


I am looking at my Centos VM and trying to understand memory. I know that cache + free memory is supposed to be available (for apps) memory. But here it is 431M + 2.1GB is free+cache. How 26gb is available ?
Code:
[root@Centos-4444 ~]# free -h
                total       used        free        shared      buff/cache      available
Mem:            31G         28G         431M        97M         2.1G            26G
Swap:           15G         19M         15G
[root@Centos-4444 ~]#
Problem is, monitoring tool is looking at free memory and creating ticket for us that free memory is only 431MB.
Please suggest. Thanks
 
Old 10-05-2023, 10:37 AM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
The monitoring tool is only looking at one factor and does not understand how RAM is allocated nor how free is displaying the values.

There is probably a lot of stale data in the "used" space that could be cleared out (deleted or swapped out) when more space is needed thus a major portion of the "used" is actually "available". Systems are designed to keep data available for quick access as long as adequate RAM is there for the purpose, so unnecessary swapping or deletions are delayed.

The monitoring tool really should be looking at both "free" and "available".

Note mine here
Code:
# free -h
               total        used        free      shared  buff/cache   available
Mem:            31Gi        13Gi       1.9Gi       214Mi        16Gi        17Gi
Swap:          8.0Gi        17Mi       8.0Gi
I only have 32GB but used + available totals 40GB.
On yours used + available totals 54GB

The buff/cache value also factors into that.
Note that the used + free + shared + buff/cache ~= total, and available is a value that may be repurposed from all the others.

Last edited by computersavvy; 10-05-2023 at 10:47 AM.
 
1 members found this post helpful.
Old 10-05-2023, 10:54 AM   #3
james000
Member
 
Registered: Sep 2018
Posts: 143

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by computersavvy View Post
The monitoring tool is only looking at one factor and does not understand how RAM is allocated nor how free is displaying the values.

There is probably a lot of stale data in the "used" space that could be cleared out (deleted or swapped out) when more space is needed thus a major portion of the "used" is actually "available". Systems are designed to keep data available for quick access as long as adequate RAM is there for the purpose, so unnecessary swapping or deletions are delayed.

The monitoring tool really should be looking at both "free" and "available".

Note mine here
Code:
# free -h
               total        used        free      shared  buff/cache   available
Mem:            31Gi        13Gi       1.9Gi       214Mi        16Gi        17Gi
Swap:          8.0Gi        17Mi       8.0Gi
I only have 32GB but used + available totals 40GB.
On yours used + available totals 54GB

The buff/cache value also factors into that.
Note that the used + free + shared + buff/cache ~= total, and available is a value that may be repurposed from all the others.
In my case, should monitoring tool look at available+free (26gb + 431mb) as 26.5gb as 'true' free memory?
Only 5.5gb memory is in use then?
 
Old 10-05-2023, 02:09 PM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
IMHO just "available" is the best bet.
 
1 members found this post helpful.
Old 10-06-2023, 02:44 AM   #5
lvm_
Member
 
Registered: Jul 2020
Posts: 930

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by james000 View Post
In my case, should monitoring tool look at available+free (26gb + 431mb) as 26.5gb as 'true' free memory?
No, just available. Why don't you read the man page?
 
  


Reply

Tags
centos 7



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get total cpu usage, total memory usage and available memory Chiba Linux - Software 1 11-15-2014 04:36 PM
Does /dev/shm reduce memory available for non-shared memory segments? mightyscotchpine Linux - Server 1 09-22-2009 06:58 PM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
installed system memory differs from mounted (available) memory landroni Debian 5 08-13-2007 06:43 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration