How quickly and efficiently the OS can free up the cached RAM?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I know about the concept of "Free RAM is wasted RAM". My question is how quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage.
We have a web app hosted in linux. We normally have 10-20% memory utilisation. But we see spikes up to about 100% when certain parts of the code is invoked.(Code has been max optimised).I want to trigger an email when this happens. Should I write a script to monitor memory utilisation including Cache or just the application memory ?
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
linux ubuntu memory
add a comment |Â
up vote
0
down vote
favorite
I know about the concept of "Free RAM is wasted RAM". My question is how quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage.
We have a web app hosted in linux. We normally have 10-20% memory utilisation. But we see spikes up to about 100% when certain parts of the code is invoked.(Code has been max optimised).I want to trigger an email when this happens. Should I write a script to monitor memory utilisation including Cache or just the application memory ?
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
linux ubuntu memory
2
In comparison to a network connection, the time taken to make cached memory available to a program in negligible. What issue do you have?
â Kusalananda
Oct 9 '17 at 7:44
What is that web app? Say much more about it. In what programming language? If in a compiled language, how exactly was it compiled? Better put more efforts on improving the app, or get more resources (buy more RAM), than in just coding a script to detect the situation. Do you know what exact part needs so much memory?
â Basile Starynkevitch
Oct 9 '17 at 10:31
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I know about the concept of "Free RAM is wasted RAM". My question is how quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage.
We have a web app hosted in linux. We normally have 10-20% memory utilisation. But we see spikes up to about 100% when certain parts of the code is invoked.(Code has been max optimised).I want to trigger an email when this happens. Should I write a script to monitor memory utilisation including Cache or just the application memory ?
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
linux ubuntu memory
I know about the concept of "Free RAM is wasted RAM". My question is how quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage.
We have a web app hosted in linux. We normally have 10-20% memory utilisation. But we see spikes up to about 100% when certain parts of the code is invoked.(Code has been max optimised).I want to trigger an email when this happens. Should I write a script to monitor memory utilisation including Cache or just the application memory ?
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
linux ubuntu memory
linux ubuntu memory
edited Oct 9 '17 at 9:20
asked Oct 9 '17 at 7:35
Jibin
1011
1011
2
In comparison to a network connection, the time taken to make cached memory available to a program in negligible. What issue do you have?
â Kusalananda
Oct 9 '17 at 7:44
What is that web app? Say much more about it. In what programming language? If in a compiled language, how exactly was it compiled? Better put more efforts on improving the app, or get more resources (buy more RAM), than in just coding a script to detect the situation. Do you know what exact part needs so much memory?
â Basile Starynkevitch
Oct 9 '17 at 10:31
add a comment |Â
2
In comparison to a network connection, the time taken to make cached memory available to a program in negligible. What issue do you have?
â Kusalananda
Oct 9 '17 at 7:44
What is that web app? Say much more about it. In what programming language? If in a compiled language, how exactly was it compiled? Better put more efforts on improving the app, or get more resources (buy more RAM), than in just coding a script to detect the situation. Do you know what exact part needs so much memory?
â Basile Starynkevitch
Oct 9 '17 at 10:31
2
2
In comparison to a network connection, the time taken to make cached memory available to a program in negligible. What issue do you have?
â Kusalananda
Oct 9 '17 at 7:44
In comparison to a network connection, the time taken to make cached memory available to a program in negligible. What issue do you have?
â Kusalananda
Oct 9 '17 at 7:44
What is that web app? Say much more about it. In what programming language? If in a compiled language, how exactly was it compiled? Better put more efforts on improving the app, or get more resources (buy more RAM), than in just coding a script to detect the situation. Do you know what exact part needs so much memory?
â Basile Starynkevitch
Oct 9 '17 at 10:31
What is that web app? Say much more about it. In what programming language? If in a compiled language, how exactly was it compiled? Better put more efforts on improving the app, or get more resources (buy more RAM), than in just coding a script to detect the situation. Do you know what exact part needs so much memory?
â Basile Starynkevitch
Oct 9 '17 at 10:31
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
How quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage?
Unless you are using ZFS on Linux with which the ARC might not shrink fast enough to absorb a sudden RAM demand, the time spent by the kernel to free the caches is negligible, as already commented by Kusalananda.
Should I write a script to monitor memory utilisation including Cache or just the application memory ?
I would monitor both the application memory and the system one. When the cache is reduced to make room for application memory, performance might drop because more disk I/Os are required.
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
When an out of memory occurs, most buffers/cache has been freed/flushed but that doesn't mean all the memory is used by applications. A part of the memory is still used by the kernel, and possibly a ram based file system or directly by some hardware.
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
How quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage?
Unless you are using ZFS on Linux with which the ARC might not shrink fast enough to absorb a sudden RAM demand, the time spent by the kernel to free the caches is negligible, as already commented by Kusalananda.
Should I write a script to monitor memory utilisation including Cache or just the application memory ?
I would monitor both the application memory and the system one. When the cache is reduced to make room for application memory, performance might drop because more disk I/Os are required.
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
When an out of memory occurs, most buffers/cache has been freed/flushed but that doesn't mean all the memory is used by applications. A part of the memory is still used by the kernel, and possibly a ram based file system or directly by some hardware.
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
add a comment |Â
up vote
0
down vote
How quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage?
Unless you are using ZFS on Linux with which the ARC might not shrink fast enough to absorb a sudden RAM demand, the time spent by the kernel to free the caches is negligible, as already commented by Kusalananda.
Should I write a script to monitor memory utilisation including Cache or just the application memory ?
I would monitor both the application memory and the system one. When the cache is reduced to make room for application memory, performance might drop because more disk I/Os are required.
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
When an out of memory occurs, most buffers/cache has been freed/flushed but that doesn't mean all the memory is used by applications. A part of the memory is still used by the kernel, and possibly a ram based file system or directly by some hardware.
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
add a comment |Â
up vote
0
down vote
up vote
0
down vote
How quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage?
Unless you are using ZFS on Linux with which the ARC might not shrink fast enough to absorb a sudden RAM demand, the time spent by the kernel to free the caches is negligible, as already commented by Kusalananda.
Should I write a script to monitor memory utilisation including Cache or just the application memory ?
I would monitor both the application memory and the system one. When the cache is reduced to make room for application memory, performance might drop because more disk I/Os are required.
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
When an out of memory occurs, most buffers/cache has been freed/flushed but that doesn't mean all the memory is used by applications. A part of the memory is still used by the kernel, and possibly a ram based file system or directly by some hardware.
How quickly and efficiently the OS can free up the cached RAM, so that apps have enough RAM in time of a spike in usage?
Unless you are using ZFS on Linux with which the ARC might not shrink fast enough to absorb a sudden RAM demand, the time spent by the kernel to free the caches is negligible, as already commented by Kusalananda.
Should I write a script to monitor memory utilisation including Cache or just the application memory ?
I would monitor both the application memory and the system one. When the cache is reduced to make room for application memory, performance might drop because more disk I/Os are required.
When the Out of Memory error occurs in linux, does it means cache memory is zero and all the RAM has been already allocated to applications ?
When an out of memory occurs, most buffers/cache has been freed/flushed but that doesn't mean all the memory is used by applications. A part of the memory is still used by the kernel, and possibly a ram based file system or directly by some hardware.
answered Oct 9 '17 at 13:33
jlliagre
45.1k578124
45.1k578124
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
add a comment |Â
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
Will the condition (app memory + cache) > 95 % occur often or only in case of usage spikes ?
â Jibin
Oct 9 '17 at 14:00
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
That entirely depends on the configuration, the overall I/O usage on your machine and the running applications behavior.
â jlliagre
Oct 9 '17 at 15:25
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
Would you please care to explain
â Jibin
Oct 10 '17 at 5:30
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
I mean there is no rule, that might happen very quickly, rarely or never, depending on the installed RAM and what your applications are doing with the disk, the disk size and how much of it is accessed. The simpler way to figure it out is for you to monitor your system and see how RAM usage evolves.
â jlliagre
Oct 10 '17 at 6:16
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f396952%2fhow-quickly-and-efficiently-the-os-can-free-up-the-cached-ram%23new-answer', 'question_page');
);
Post as a guest
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
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
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
2
In comparison to a network connection, the time taken to make cached memory available to a program in negligible. What issue do you have?
â Kusalananda
Oct 9 '17 at 7:44
What is that web app? Say much more about it. In what programming language? If in a compiled language, how exactly was it compiled? Better put more efforts on improving the app, or get more resources (buy more RAM), than in just coding a script to detect the situation. Do you know what exact part needs so much memory?
â Basile Starynkevitch
Oct 9 '17 at 10:31