From mboxrd@z Thu Jan  1 00:00:00 1970
From: Peter =?utf-8?q?M=C3=BCller?= <peter.mueller@link38.eu>
To: development@lists.ipfire.org
Subject: Re: [PATCH] Allow kernel to swap memory on high demand
Date: Tue, 25 Sep 2018 20:29:55 +0200
Message-ID: <021e5d95-f39b-a7b4-0464-ba8b4a335449@link38.eu>
In-Reply-To: <20180925175231.6080-1-ipfr@tfitzgeorge.me.uk>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7951970768460713505=="
List-Id: <development.lists.ipfire.org>

--===============7951970768460713505==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

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=3D1=
1839 .
Just some comments from my side... :-)

Thanks, and best regards,
Peter M=C3=BCller


> 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(-)
>=20
> 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 =3D 0
>  net.ipv4.conf.all.log_martians =3D 1
> =20
>  kernel.printk =3D 1 4 1 7
> -vm.swappiness=3D0
> +vm.swappiness=3D1
>  vm.mmap_min_addr =3D 4096
>  vm.min_free_kbytes =3D 8192
> =20
>=20

--=20
Microsoft DNS service terminates abnormally when it recieves a response
to a DNS query that was never made.  Fix Information: Run your DNS
service on a different platform.
		-- bugtraq

--===============7951970768460713505==--