Memory immediately available in linux memory management system
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This is the output of free -h
command on my Ubuntu 18.04
laptop:
$ free -hg
total used free shared buff/cache available
Mem: 11G 4,2G 3,4G 801M 4,0G 6,3G
Swap: 11G 0B 11G
From what I understand after a short research using mostly stackexchange sites (e.g. this elaboration), the main difference among free
and available
memory is that free
is actually free
and available
can become free
if the need arises
What is the process via which the available
memory is allocated to a task that creates the relevant need?
Does flushing dirty pages and freeing up cache
, (to allocate the memory freed up to a process that requires it) constitute part of such a process?
In such a case I assume available
should always be > cache
.
linux-kernel memory free
add a comment |
up vote
0
down vote
favorite
This is the output of free -h
command on my Ubuntu 18.04
laptop:
$ free -hg
total used free shared buff/cache available
Mem: 11G 4,2G 3,4G 801M 4,0G 6,3G
Swap: 11G 0B 11G
From what I understand after a short research using mostly stackexchange sites (e.g. this elaboration), the main difference among free
and available
memory is that free
is actually free
and available
can become free
if the need arises
What is the process via which the available
memory is allocated to a task that creates the relevant need?
Does flushing dirty pages and freeing up cache
, (to allocate the memory freed up to a process that requires it) constitute part of such a process?
In such a case I assume available
should always be > cache
.
linux-kernel memory free
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is the output of free -h
command on my Ubuntu 18.04
laptop:
$ free -hg
total used free shared buff/cache available
Mem: 11G 4,2G 3,4G 801M 4,0G 6,3G
Swap: 11G 0B 11G
From what I understand after a short research using mostly stackexchange sites (e.g. this elaboration), the main difference among free
and available
memory is that free
is actually free
and available
can become free
if the need arises
What is the process via which the available
memory is allocated to a task that creates the relevant need?
Does flushing dirty pages and freeing up cache
, (to allocate the memory freed up to a process that requires it) constitute part of such a process?
In such a case I assume available
should always be > cache
.
linux-kernel memory free
This is the output of free -h
command on my Ubuntu 18.04
laptop:
$ free -hg
total used free shared buff/cache available
Mem: 11G 4,2G 3,4G 801M 4,0G 6,3G
Swap: 11G 0B 11G
From what I understand after a short research using mostly stackexchange sites (e.g. this elaboration), the main difference among free
and available
memory is that free
is actually free
and available
can become free
if the need arises
What is the process via which the available
memory is allocated to a task that creates the relevant need?
Does flushing dirty pages and freeing up cache
, (to allocate the memory freed up to a process that requires it) constitute part of such a process?
In such a case I assume available
should always be > cache
.
linux-kernel memory free
linux-kernel memory free
edited Nov 17 at 20:16
asked Nov 17 at 18:25
pkaramol
430216
430216
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
It’s a bit more complicated than that. Available memory is memory which is immediately reclaimable, i.e. can be re-purposed without losing data, minus certain thresholds below which the system swaps. This doesn’t include dirty pages, since they need to be written out, and that can take a lot of time.
See the above link for details. In particular, the existence of thresholds, and the fact that “buff/cache” includes dirty pages, means that there is no guarantee that the available memory is larger than the amount given under “buff/cache”.
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
1
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
It’s a bit more complicated than that. Available memory is memory which is immediately reclaimable, i.e. can be re-purposed without losing data, minus certain thresholds below which the system swaps. This doesn’t include dirty pages, since they need to be written out, and that can take a lot of time.
See the above link for details. In particular, the existence of thresholds, and the fact that “buff/cache” includes dirty pages, means that there is no guarantee that the available memory is larger than the amount given under “buff/cache”.
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
1
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
add a comment |
up vote
2
down vote
accepted
It’s a bit more complicated than that. Available memory is memory which is immediately reclaimable, i.e. can be re-purposed without losing data, minus certain thresholds below which the system swaps. This doesn’t include dirty pages, since they need to be written out, and that can take a lot of time.
See the above link for details. In particular, the existence of thresholds, and the fact that “buff/cache” includes dirty pages, means that there is no guarantee that the available memory is larger than the amount given under “buff/cache”.
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
1
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
It’s a bit more complicated than that. Available memory is memory which is immediately reclaimable, i.e. can be re-purposed without losing data, minus certain thresholds below which the system swaps. This doesn’t include dirty pages, since they need to be written out, and that can take a lot of time.
See the above link for details. In particular, the existence of thresholds, and the fact that “buff/cache” includes dirty pages, means that there is no guarantee that the available memory is larger than the amount given under “buff/cache”.
It’s a bit more complicated than that. Available memory is memory which is immediately reclaimable, i.e. can be re-purposed without losing data, minus certain thresholds below which the system swaps. This doesn’t include dirty pages, since they need to be written out, and that can take a lot of time.
See the above link for details. In particular, the existence of thresholds, and the fact that “buff/cache” includes dirty pages, means that there is no guarantee that the available memory is larger than the amount given under “buff/cache”.
answered Nov 17 at 18:40
Stephen Kitt
157k23343418
157k23343418
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
1
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
add a comment |
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
1
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
However can't the mmanagement module free memory from inactive(file), thus by flushing cache to hard disk? "inactive :The amount of inactive memory (in KB), or memory that has not been used for a while and is eligible to be swapped to disk." (from: bit.ly/2OTM4VW)
– pkaramol
Nov 17 at 20:17
1
1
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
“Inactive(file)” represents the inactive part of the page cache, i.e. file-backed memory which hasn’t been used recently. It isn’t dirty, so it can be discarded at any time (the data is stored elsewhere already).
– Stephen Kitt
Nov 17 at 22:17
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482373%2fmemory-immediately-available-in-linux-memory-management-system%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown