Commit b4991c23 authored by Tails developers's avatar Tails developers
Browse files

Set more appropriate Linux VM config before wiping memory.

These parameters were stolen from Liberté Linux' source.
As a result, the process should be both more robust and more efficient.
parent 834a1be8
......@@ -6,6 +6,17 @@ prereqs() {
echo "${PREREQ}"
}
tweak_sysctl() {
echo 3 > /proc/sys/kernel/printk
echo 3 > /proc/sys/vm/drop_caches
echo 256 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/overcommit_memory
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 0 > /proc/sys/vm/oom_dump_tasks
}
case ${1} in
prereqs)
prereqs
......@@ -14,6 +25,7 @@ case ${1} in
esac
if [ -n "${sdmem}" ] ; then
tweak_sysctl
if [ -n "${sdmemopts}" ] ; then
/usr/bin/sdmem "-${sdmemopts}"
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment