0

Ever since the lockdowns forced me to use Chromium which used so much memory that it impacted the stability of my system, I always have the gnome system monitor open and obsessively check it for RAM usage. I usually try to not let it get over 70% to 80% of my install RAM, but what (in percentage or absolute terms) would be the correct value? How does it depend on the used/available swap?

I sadly couldn't find anything on the web on this topic.

Thanks!

zvavybir
  • 103
  • 5
  • Free memory is wasted resources, I'd only start monitoring if over 99% memory is used – Jaromanda X Jul 25 '23 at 06:53
  • @JaromandaX But then I have to quickly decide (and act on it!) which process I want to kill and potentially have data loss? – zvavybir Jul 25 '23 at 06:54
  • oh, so you currently have out of memory issues, so you monitor the ram and kill off processes now? – Jaromanda X Jul 25 '23 at 07:04
  • @JaromandaX No, I look at how much memory I have and – if necessary – whether I can gracefully(!) free some. If I didn't monitor it, I would have to do it very quickly. – zvavybir Jul 25 '23 at 07:28
  • I have two suggestions: 1. add more RAM if possible and affordable. 2. maybe try the [Marvellous Suspender](https://chrome.google.com/webstore/detail/the-marvellous-suspender/noogafoofpebimajpfpamcfhoaifemoa) plugin for chromium (GPL source available at https://github.com/gioxx/MarvellousSuspender) - it suspends idle tabs, helping to reduce resource usage. – cas Jul 25 '23 at 07:57
  • `I would have to do it very quickly` otherwise what will happen? See, I think you're trying to prevent a problem that may not exist – Jaromanda X Jul 25 '23 at 08:06
  • use [OOM](https://www.kernel.org/doc/gorman/html/understand/understand016.html) and [use zram instead of normal disk swap](https://unix.stackexchange.com/a/499645/44425) – phuclv Jul 25 '23 at 08:40
  • I think the question is "How much memory should be available? " where *available* is the amount reported by the command `free -m`. – August Karlstrom Jul 25 '23 at 09:28

1 Answers1

2

Please start using earlyoom or systemd-oomd and forget about managing RAM.

How much memory should be left free?

Normally none: https://www.linuxatemyram.com

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64
  • I am aware of a) this site and of b) the OOM killers (both the normal one as also earlyoom), but a) that's why I explicitly specified that I get the value from gnome system monitor, which (at least I'm pretty sure) does not include disk caching and b) my fear of OOM killers is exactly the reason I'm asking this question. I either impossibly quickly close a process or some semi-random and probably important process is killed which causes data loss (I do know that OOM killers try to determine an unimportant process, but this is of course not always correct). – zvavybir Jul 25 '23 at 14:54