emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 5c532fe303: Recommend that the user turn off memory overcommi


From: Tim Cross
Subject: Re: master 5c532fe303: Recommend that the user turn off memory overcommit
Date: Sat, 09 Apr 2022 15:51:33 +1000
User-agent: mu4e 1.7.12; emacs 28.1.50

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > +@cindex memory trouble, GNU/Linux
>   > > +  On GNU/Linux systems, the system does not normally report running
>   > > +out of memory to Emacs, and can instead randomly kill processes when
>   > > +they run out of memory.  We recommend that you turn this behavior off,
>   > > +so that Emacs can respond correctly when it runs out of memory, by
>   > > +becoming the super user, editing the file @code{/etc/sysctl.conf} to
>   > > +contain the following lines, and then running the command @code{sysctl
>   > > +-p}:
>
>   > FWIW, I think this is none of Emacs's business.
>
> The idea of "Emacs's business" is not a coherent concept
> when we're thinking about what to say in the Emacs Manual.
> The right question is, is this Emacs users' business?
>
> The Emacs Manual is meant to tell Emacs users what they need to know,
> and if this is something important for Emacs users to know about, that
> is a fine place to tell them.
>
> I don't have an opinion about what is best to do about this.  However,
> if a problem means Emacs is likely crash, and we can't fix the problem
> in Emacs itself, giving users advice in the manual is good to
> consider.
>
> I wonder if it is possible for Emacs to explicitly ask whether it is
> getting close to overcommitting.  Even if that approach can't entirely
> prevent the problem of surprise death, it might make that problem
> happen much less frequently.

I suspect the problem may be the 'we recommend". I'm not sure "we"
should be recommending modifying default system settings just for the
benefit of one application.

Isn't the whole purpose of random killing processes to free up resources
and prevent core services from failing and crashing the system?
If this is the case, recommending turning it off to allow Emacs to
gracefully handle out of memory situations might not be of any benefit
given it will be more likely for the system to crash in these
situations, preventing any action by Emacs.

Might be better to just state what the situation is and one possible
option to consider if it becomes a frequent issue (i.e. Emacs being
killed unexpectedly).

Is this a very common issue? I've run Emacs on some pretty old systems
with little memory and while I've certainly had processes killed, it has
never killed Emacs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]