On Mon, Dec 06, 2021 at 02:28:35PM +0000, Phil Endecott wrote:
On one of my Lightsail instances, which was created a few years
ago from a Debian image and has subsequently been upgraded a few
times, I have a /etc/sysctl.d/01_ec2.conf file which sets
vm.swappiness = 0. On another newer EC2 instance I don't have this
file.
Right; we haven't shipped that file since (IIRC) jessie.
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.
Does anyone recognise this? Of course the issue is that I
discovered the hard way that the system was not using its
swapfile. The file has a pile of other configuration settings
and I wonder if any of those are also undesirable, see below.
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.