my ram usage increases over time for some reason unknown to me. my system idles about 4.5GiB. If I leave my system on and idle for extended periods of time my ram usage will creep up to a maximum of 12GiB that I have recorded thus far. I am monitoring applications and processes running, Can any one point me towards how to solve this?
thanks in advance
Monitor which program is doing this with htop, system monitor or a similar program. See how much ram is being used by the different programs. Sounds like one of them has a serious memory leak.
You can see which process uses most memory by running this command in the terminal:
for i in {1..10};do date; /usr/bin/top -b -o +%MEM | head -n 17|tail -11;sleep 5;done
It’ll run until it’s terminated with Ctrl+C and every second or so output the highest memory users. Then it’s quite easy to find the process causing the high memory usage and do something about it.
Your system is using your RAM for caching in order to increase performance, because unused RAM is useless RAM.
The cache size is dynamic and is adjusted according to the needs of the moment. If more RAM is needed for a certain application and/or its data, then the kernel will either release some of the cache memory or page out some of the data for applications that aren’t currently in use to the swap partition or swap file.
There is nothing to worry about. Linux ─ the kernel ─ is very good at managing memory.