Home_greyopenFATE - openSUSE feature tracking > #316466
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

place default memory limit on processes within desktop session

Feature state

openSUSE Factory


It's currently possible for a memory leak in a userspace process to push a system far enough into swap that it basically results in the system being unusable for a significant amount of time. google-chrome, xfce4-panel, virt-manager, and nm-applet are a few recent examples which spring to mind. When kswapd is heavily stressed, logging in to the box to run top and kill some processes can take minutes or longer in the worst case.
Maybe this could be argued to be a kernel bug, but ultimately I guess any kind of heavy swapping is going to kill performance. So instead of *solely* depending on the kernel to behave perfectly in low memory situations, it seems sensible to have some sort of preventative measure which would defend against buggy userspace processes. Therefore I suggest that desktop sessions should be tuned via cgroups to impose a default memory limit (RSS? VSS? I'm not sure which is best) of something like 80% of available RAM for any normal process, and then offer some kind of whitelist mechanism for processes which are expected to require a large amount of RAM.

The ideal UX would be that if a desktop process hits the limit, a dialog box would pop up in the same session saying "This process is requesting more than $x RAM. This could be required for a genuine reason, or could be due to a memory leak. Deny / Allow / Always Allow". I'm not sure whether cgroups supports a mechanism for triggering userspace events like this, but if there's some way to achieve that, it would be great!

User benefit:

This would help promote openSUSE as a robust, reliable distribution, and the cgroups suggestion sounds like a pretty high reward to effort ratio which turns technical capability into practical advantage. (The dialog idea would probably take a lot more effort.)


icons/user_comment.png A. S. wrote: (4 years ago)

Possible approaches to implementation are currently being discussed in this thread:

We should probably open this discussion up by moving to a public list ...

Last change: 4 years ago
Score: 1
  • Negative: 0
  • Neutral: 0
  • Positive: 1
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint