3

My computers have been freezing too much because of a lack of RAM. I need this to happen less. I am aware that the system in this high-RAM usage state is technically still solving the problem via SSD usage or whatnot, but I cannot wait hours for the system to resolve the problem. I am running up-to-date 16.04 and I require this version of Ubuntu.

Note that my computers are not particularly old, both are from within the last three years and have a minimum of 8 GB RAM. I suspect that this memory issue is arising from a larger preponderance of Electron apps.

I run indicator-sysmonitor which shows how much RAM memory is being used and can see that memory usage is clearly the problem because the freeze occurs when the memory usage is displayed at something like 97 % before things go bad.

So, the current solutions inbuilt in Ubuntu/GNU/Linux are not working for me.

  • What solutions that might suit me better exist?

Right now I imagine creating a blacklist of programs (e.g. Firefox, Chromium, Signal, Riot) with a small program killing these blacklisted programs in order of their memory usage if the total system memory usage approaches 97%.

  • Does such a solution exist?
  • How might it be enabled on my systems?

EDIT: I have added swap details below:

$ swapon --summary
Filename                Type        Size    Used    Priority
/dev/sda5                               partition   12469244    0   -1
$ free -h
              total        used        free      shared  buff/cache   available
Mem:            11G        1.9G        5.8G        943M        3.9G        8.4G
Swap:           11G          0B         11G

EDIT: As some have suggested, this is absolutely nothing to do with limiting the memory process of a single process (as described here). This is about looking at the total memory usage and then progressively taking actions against a blacklist of programs as an urgent measure to stop the computer freezing up. A solution is presented below. Please answer if there is a better approach to this.

  • 3
    Have you tried to add more swap-space ? How much swap do you have ? – Soren A Oct 08 '18 at 13:11
  • @SorenA Thanks for your thoughts on this. I am not an expert on swap space so went with the defaults that happen on installation of Ubuntu 16.04. I have added the output of some elucidatory commands to the question in an edit. My reading of it is that I have 11 GB of swap space. This might feel enough, but whatever it is not working, and part of this might be to do with the speed at which swap memory can work. The existing setup does not do what I need it to do. It is better for the programs to be killed than for the computer to halt for hours as it tries to fix the problem. – BlandCorporation Oct 08 '18 at 13:20
  • Yes, you have 11GB RAM and 11 GB swap .. that seems to be okay. Try to run the free command when the system is having problems to see if RAM / swap really is used up. – Soren A Oct 08 '18 at 13:47
  • 1
  • The available value under free -h is how much actual memory is usable by the system. The solution you ask for exists, and is a native part of Linux. I've suggested an appropriate duplicate for that solution. – dobey Oct 08 '18 at 13:51

0 Answers0