Page 1 of 1

[SOLVED]Prevent RAM usage from overloading.

PostPosted: Nov 15th, '22, 13:39
by gaojicainiao
Some time ago. I dealt with plenty of small files. I found that RAM usage was easily getting too high, but system monitor reported no processes capturing so much RAM.
It confused me. I needed to reboot to clear it.
Later when I was using Virtualbox to run another operating system, the problem still bothered me.
Command “echo 3 > /proc/sys/vm/drop_caches” does not work.
I have found the solution. Edit /etc/sysctl.conf, add following:
vm.overcommit_memory=0

Then execute the command as root:
sysctl -p

Reboot. Done.
It did not cause any other problem. I do not understand it in details, but it did work.

So, how about adding this pre-configuration in Mageia 9?
And, should I add “[SOLVED]” in title? As of I have given a manual solution.

Oh, seems I posted in wrong place. It should be in “Ideas and suggestions”.

Re: Prevent RAM usage from overloading.

PostPosted: Nov 15th, '22, 20:41
by doktor5000
gaojicainiao wrote:I found that RAM usage was easily getting too high, but system monitor reported no processes capturing so much RAM.

It would be appreciated if you would mention how you found that out in particular, what command and what values you looked at.

Usually every free amount of memory is used by file caching, this is nothing that needs to be fixed.

gaojicainiao wrote:And, should I add “[SOLVED]” in title? As of I have given a manual solution.

A solution to what problem in particular ?

Re: Prevent RAM usage from overloading.

PostPosted: Nov 16th, '22, 04:29
by gaojicainiao
I use gnome system monitor to watch RAM usage, because it is accurate, when it reach 100%, the system sticks.
The kde system monitor show RAM usage about a half GiB smaller than gnome system monitor. The system will stick even it does not reach 100%.
These two system monitor all says no processes capturing so much RAM when the problem happen, I also tried command “top”, same results.
I do not know if that unknown part of RAM usage is file cache, but I think file cache should not be calculated in that usage because it could be released anytime when other processes in need.
The displaying of high RAM usage make me uneasy. I tried to log out and log in and did not work.
I found a usable solution that setting “vm.overcommit_memory=0”. After that, the RAM usage has not got high strangely again.

If it confusing you, ignore please. I am sorry for asking a weird question. I do not have comprehensive information and also I have no need to test that again.