Score:0

Why does gui restarts on peak physical memory usage, though there is still plenty of virutal memory?

cn flag

This has happened often. Everytime I see peak RAM usage, GUI restarts. Please, I would be greatful for any help.

What are any other information required ?


This has been happening to me when I use Windows 10 in Virtualbox, which I have made to consume 6GB ram. I have 12 GB ram, & 25 GB swap.

Score:2
cn flag

A common event when low on RAM occurs when the kernel OOM-killer decides to sacrifice the desktop. This loses all your unsaved work and kicks you out to a login prompt.

The sequence of events runs something like this:

  1. Your system is low on memory (memory = RAM + swap)
  2. An application demands more memory than the system has available.
  3. The kernel responds to this demand by looking for a different application to terminate in order to free up enough memory.
  4. The kernel's Out-Of-Memory-Killer (OOM-Killer) function decides that the desktop itself is a good candidate for termination.
  5. Terminating the desktop returns you to the login prompt.
  • This may arguably demonstrate bug in the OOM-killer. It should be killing individual applications instead of killing the entire desktop. However, it's a thorny problem to solve so don't plan on that bug being fixed rapidly.

There are a few things you can do about it:

  • Track your memory usage. Use the free command to snapshot your normal RAM and swap use. Look for unxepectedly high usage. Look for unexpectedly low swap.

  • Add more swap. Swap is disk space that can be used as (slower) memory pages of RAM. If you're not using swap, add some. If your swap space is insufficient, expand it. Swap is not a perfect solution: It's slow, and a sluggish system might be just as annoying.

  • Reduce your use of memory-hungry applications. The big offenders for typical users are web browsers. Each tab that you're not actively watching may still be consuming vast amounts of memory. If you're low on memory, closing a few tabs might be an easy way to free up resources for more important activities.

  • Add more RAM. It means spending money and opening your case, but if the free and easy changes are not enough....

cn flag
Thank you. I guess the `OOM-Killer` applies here too. But what I dont understand is I still have plenty of swap, which is still empty when this Terminating happens. Will it make any better if I increase my swap ?
Raffa avatar
jp flag
@maan81 Swapping takes time to move unused/least used memory pages to the swap space on disk and if your RAM gets full fast, then your available usable memory becomes technically full at that moment ... That's one and two swapping only happens if some memory pages can be moved from RAM which is not always the case as all/most of memory pages might be in active use e.g. when one single active process is consuming most of RAM ... Those are two cases where swap space can't really help or even be used ... `journalctl --grep 'OOM'` can shed some light on that.
user535733 avatar
cn flag
@maan81 if you believe your swap to be unused, then please open a new question showing the clues that have led you to that conclusion. Also use the "search" box at the top of the page to find other swap-related questions. It's likely somebody has asked it before.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.