-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path06ramscript
38 lines (30 loc) · 1.06 KB
/
06ramscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/system/bin/sh
# Copyright 2011 Juwe11
# 13.8.2011 Updated VM values - Thanks to [Kalis] for help
# 18.8.2011 Added values for oom_adj
# Output the script name for easier run-parts debugging
echo Now running $0
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,1,2,4,6,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree
fi
if [ -e /proc/sys/vm/swappiness ]; then
echo "0" > /proc/sys/vm/swappiness
fi
if [ -e /proc/sys/vm/vfs_cache_pressure ]; then
echo "50" > /proc/sys/vm/vfs_cache_pressure
fi
if [ -e /proc/sys/vm/dirty_expire_centisecs ]; then
echo "1000" > /proc/sys/vm/dirty_expire_centisecs
fi
if [ -e /proc/sys/vm/dirty_writeback_centisecs ]; then
echo "2000" > /proc/sys/vm/dirty_writeback_centisecs
fi
if [ -e /proc/sys/vm/dirty_ratio ]; then
echo "45" > /proc/sys/vm/dirty_ratio
fi
if [ -e /proc/sys/vm/dirty_background_ratio ]; then
echo "25" > /proc/sys/vm/dirty_background_ratio
fi