Re: /etc/sysctl.d/01_ec2.conf sets vm.swappiness = 0
On Tue, Dec 07, 2021 at 03:53:07PM +0000, Phil Endecott wrote:
> > > dpkg -S doesn't tell me where this file came from. I don't
> > > think I created it myself!!
> > It was installed as part of the image creation process. Similar to
> > files like /etc/hosts, it is not actually owned by a package.
> I wonder if Debian needs some way to track the provenance
> of files like this?
Maybe. That's a topic for a broader forum.
> > Most of the settings from that file were lifted from Amazon Linux, IIRC,
> > and are pretty reasonable for a default "server" class VM. Even
> > vm.swappiness is a reasonable default, given that there's no swap file
> > created by default. But nothing will break if you choose to remove the
> > file.
> I'm not sure I agree with swapiness=0 being reasonable when there
> is no swapfile. If there's no swapfile, the swapiness value is
> ignored. The only effect of setting swapiness=0 on a system with
> no swap is to prevent any swap that is added in the future from
> working. If you've added swap it's likely that you want it to work.
It's also possible that you want to avoid it if you're using swap-based
hibernation. But yeah, it's a fair point; enabling swap using implies
> Anyway this is moot as the file has been removed. Though maybe you
> should consider actively removing it during updates?