From 00cff9190c8f31cbbd707d0f0a530121c3bfff15 Mon Sep 17 00:00:00 2001 From: Alexey Avramov Date: Sat, 21 Jul 2018 17:39:47 +0900 Subject: [PATCH] update readme --- README.md | 12 ++++++------ install.sh | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7719f36..21192b3 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ # Nohang -`Nohang` is a highly configurable daemon for Linux which is able to correctly prevent out of memory conditions and save disk cache. +`Nohang` is a highly configurable daemon for Linux which is able to correctly prevent out of memory (OOM) conditions and save disk cache. ## What is the problem? OOM killer doesn't prevent OOM conditions. And OOM conditions may cause loss disk cache, [freezes](https://en.wikipedia.org/wiki/Hang_(computing)), [livelocks](https://en.wikipedia.org/wiki/Deadlock#Livelock) and killing multiple processes. -Here is the opinion of some users: +Here are the words of some users: -- "How do I prevent Linux from freezing when out of memory? +>"How do I prevent Linux from freezing when out of memory? Today I (accidentally) ran some program on my Linux box that quickly used a lot of memory. My system froze, became unresponsive and thus I was unable to kill the offender. How can I prevent this in the future? Can't it at least keep a responsive core or something running?" [serverfault](https://serverfault.com/questions/390623/how-do-i-prevent-linux-from-freezing-when-out-of-memory) -- "With or without swap it still freezes before the OOM killer gets run automatically. This is really a kernel bug that should be fixed (i.e. run OOM killer earlier, before dropping all disk cache). Unfortunately kernel developers and a lot of other folk fail to see the problem. Common suggestions such as disable/enable swap, buy more RAM, run less processes, set limits etc. do not address the underlying problem that the kernel's low memory handling sucks camel's balls." -[serverfault](https://serverfault.com/questions/390623/how-do-i-prevent-linux-from-freezing-when-out-of-memory) +> "With or without swap it still freezes before the OOM killer gets run automatically. This is really a kernel bug that should be fixed (i.e. run OOM killer earlier, before dropping all disk cache). Unfortunately kernel developers and a lot of other folk fail to see the problem. Common suggestions such as disable/enable swap, buy more RAM, run less processes, set limits etc. do not address the underlying problem that the kernel's low memory handling sucks camel's balls." +[serverfault](https://serverfault.com/questions/390623/how-do-i-prevent-linux-from-freezing-when-out-of-memory#comment417508_390625) -- Also look at "Why are low memory conditions handled so badly?" [r/linux](https://www.reddit.com/r/linux/comments/56r4xj/why_are_low_memory_conditions_handled_so_badly/) - discussion with 480+ posts. +Also look at "Why are low memory conditions handled so badly?" [r/linux](https://www.reddit.com/r/linux/comments/56r4xj/why_are_low_memory_conditions_handled_so_badly/) - discussion with 480+ posts. ## Solutions diff --git a/install.sh b/install.sh index 7c9b7c7..65ebe3f 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,9 @@ chmod 755 /usr/local/bin/nohang mkdir /etc/nohang chmod 755 /etc/nohang cp nohang.conf /etc/nohang/ +cp default_values_backup.conf /etc/nohang/ chmod 644 /etc/nohang/nohang.conf +chmod 644 /etc/nohang/default_values_backup.conf gzip -k nohang.1 mkdir /usr/local/share/man/man1