Hello Tim,
I am not sure about the side-effects introduced with this patch.
As far as I am aware, values for "vm.swappiness" range from 0 (disable swapping entirely) to 100 (swap aggressively). Value 1 means swapping is only used to avoid OOM situations.
This raises three questions: (a) On some systems, I observer swap usage > 0% indeed, which should not happen if value 0 for this setting _disables_ swapping.
(b) Since disk I/O is much slower than RAM access, I fear it might be a DoS vector to enable this (infected program running amok). On the other hand, if a systems might avoid running out of memory, this sounds good too.
(c) How does the kernel treat anonymous pages after changing this setting?
However, these might be academic threats since the overall issue is already discussed in https://bugzilla.ipfire.org/show_bug.cgi?id=11839 . Just some comments from my side... :-)
Thanks, and best regards, Peter Müller
Signed-off-by: Tim FitzGeorge <ipfr at tfitzgeorge.me.uk> Fixes: Bug 11839
config/etc/sysctl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf index 345f8f52a..4066af767 100644 --- a/config/etc/sysctl.conf +++ b/config/etc/sysctl.conf @@ -27,7 +27,7 @@ net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.all.log_martians = 1
kernel.printk = 1 4 1 7 -vm.swappiness=0 +vm.swappiness=1 vm.mmap_min_addr = 4096 vm.min_free_kbytes = 8192