• System killed process xxx (Out of Memory)


    I’m having issues that I haven’t had with Antergos in the past.

    Killed process 1535 (firefox) total-vm:20169584kB, anon-rss:5475224kB, file-rss:34628kB, shmem-rss:32904kB
    Out of memory: Kill process 1535 (firefox) score 391 or sacrifice child
    Killed process 1406 (Franz) total-vm:1166840kB, anon-rss:71888kB, file-rss:37748kB, shmem-rss:18500kB
    Out of memory: Kill process 1406 (Franz) score 307 or sacrifice child

    This is an example of what the Gnome protocol app shows for today. Antergos kills the Franz messenger app and Firefox or any other Browser from time to time.

    [[email protected] ~]$ free -m
    gesamt benutzt frei gemns. Puffer/Cache verfügbar
    Speicher: 7939 3176 1346 84 3416 4439
    Swap: 7940 834 7105

    However, on most days there was usually only around 100MB of free Ram, the rest was occupied by the cache. There’s never more than 50% of my Ram actually used, so I wonder why Antergos kills the apps instead of doing its thing and reallocate cache.

    Any advice is appreciated.

    Cheers

  • Out of curiosity - what’s your swappiness? Is it above 50?

  • @just whenever I ran the free -m command it showed that zero swap was used. The numbers I pasted above are an outlier it seems. I hope this is what you wanted to know.

  • @DOS-6.1 said in System killed process xxx (Out of Memory):

    …I hope this is what you wanted to know.

    No, it is not. I’ve asked for the actual, real-time swappiness value. Only forgot to indicate how to find it:

    cat /proc/sys/vm/swappiness
    
  • @just that returns 60

  • @DOS-6.1 said in System killed process xxx (Out of Memory):

    @just that returns 60

    Ouch! Too high, for my taste. I keep it at 10. Try to vary it from 1 to 20. But NEVER set it to 0.

    • create the file /etc/sysctl.d/90-swappy.conf:
      sudo touch /etc/sysctl.d/90-swappy.conf
      
    • put in it the following content:
      #--use more memory, less swap
      vm.swappiness=10
      vm.vfs_cache_pressure=50
      
    • logout-login

    See if it helps in some way.

  • the swappiness is now set to 10.
    I’ll report back in a day or two as I can’t really trigger the kills, so I’ve to wait and see.

    Thanks to you already.

  • @just
    So, after two days there hasn’t been a single process killed due to low RAM and I guess my problem is solved. Thanks again for your valuable help, just!

    I just wish I’d understand the logic behind it. Swappiness=60 is apparently the default value, and while that may not have been optimal for my system, it has never caused the above mentioned problems in the past. What is more, processes shouldn’t be killed regardless as long as RAM+Swap aren’t completely maxed out, right?

  • @DOS-6.1 said in System killed process xxx (Out of Memory):

    @just
    So, after two days there hasn’t been a single process killed due to low RAM and I guess my problem is solved. Thanks again for your valuable help, just!

    Ok, wait a couple of days to be sure that it works (no proccesses are killed), then mark the topic as [Solved}, please.

    I just wish I’d understand the logic behind it. Swappiness=60 is apparently the default value,

    Yes. it is.

    and while that may not have been optimal for my system, it has never caused the above mentioned problems in the past.

    That depends on many factors, like the OS and programs used, how the memory is allocated and released, it’s hard to name all.

    What is more, processes shouldn’t be killed regardless as long as RAM+Swap aren’t completely maxed out, right?

    Theorically you’re right. And I never seen a process killed due to the lack of memory. But again, everything depends on a particular hardware + software combination in use. It’s impossible to diagnose the issue remotely.

    My suggestion is not scientific. Rather, it is based on a kind of “feeling” established with time between Linux and the writer of this.

    Swappiness is a quite delicate matter. It may vary from 0 to 100. It controls the proportion in which physical RAM and swap space are used. There’s no a direct 1-to-1 relation between a particular swappiness value and a corresponding RAM-SWAP usage.

    Some years ago there were good explanations of swappiness in Internet.

  • Got it.

    Ok, wait a couple of days to be sure that it works (no proccesses are killed), then mark the topic as [Solved}, please.

    Will do.

ram7 kill process1 Posts 10Views 1342
Log in to reply