38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
#
|
|
# Copyright 2014, NICTA
|
|
#
|
|
# This software may be distributed and modified according to the terms of
|
|
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
|
|
# See "LICENSE_BSD2.txt" for details.
|
|
#
|
|
# @TAG(NICTA_BSD)
|
|
#
|
|
|
|
Running 64-bit Isabelle is a dangerous task. In particular, it is liable to
|
|
suck up all your RAM and send your system into swap-death on quite a regular
|
|
basis.
|
|
|
|
This Linux utility will regularly scan the system for signs of swap-death
|
|
(i.e., low memory and high pagefault rate and high load average) and send
|
|
SIGSTOP to processes suspected of being the cause.
|
|
|
|
Compile, and setup the script to run in root's home directory as follows:
|
|
|
|
gcc -O2 stop.c -o stop
|
|
sudo mv stop /root
|
|
|
|
Then add the following line to root's crontab:
|
|
|
|
@reboot /root/stop
|
|
|
|
When it triggers, it will write to syslog stating the process stopped.
|
|
|
|
Known problems:
|
|
|
|
* Chrome is memory hungry, so it will often stop your chrome processes
|
|
prior to Isabelle.
|
|
|
|
* Compiz is memory hungry, so it will sometimes stop your compiz process
|
|
before Isabelle.
|
|
|