File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ function setupSwap() {
57
57
createSwap
58
58
mountSwap
59
59
tweakSwapSettings " 10" " 50"
60
- saveSwapSettings
60
+ saveSwapSettings " 10 " " 50 "
61
61
}
62
62
63
63
function hasSwap() {
Original file line number Diff line number Diff line change @@ -91,9 +91,15 @@ function tweakSwapSettings() {
91
91
}
92
92
93
93
# Save the modified swap settings
94
+ # Arguments:
95
+ # new vm.swappiness value
96
+ # new vm.vfs_cache_pressure value
94
97
function saveSwapSettings() {
95
- echo ' vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
96
- echo ' vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
98
+ local swappiness=${1}
99
+ local vfs_cache_pressure=${2}
100
+
101
+ echo " vm.swappiness=${swappiness} " | sudo tee -a /etc/sysctl.conf
102
+ echo " vm.vfs_cache_pressure=${vfs_cache_pressure} " | sudo tee -a /etc/sysctl.conf
97
103
}
98
104
99
105
# Set the machine's timezone
You can’t perform that action at this time.
0 commit comments