From: Po Lu Date: Fri, 8 Apr 2022 11:36:03 +0000 (+0800) Subject: Recommend that the user turn off memory overcommit X-Git-Tag: emacs-29.0.90~1931^2~703 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5c532fe30305393079674557256dbb96253fd517;p=emacs.git Recommend that the user turn off memory overcommit * doc/emacs/trouble.texi (Memory Full): Tell the user that Emacs behaves best with overcommit off, and how to turn it off. --- diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 93f9c779dbf..f524a820220 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -296,6 +296,20 @@ editing in the same Emacs session. out of memory, because the Buffer Menu needs a fair amount of memory itself, and the reserve supply may not be enough. +@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}: + +@example +vm.overcommit_memory=2 +vm.overcommit_ratio=0 +@end example + @node Crashing @subsection When Emacs Crashes