CentOs7 vm.swappiness cannot be set on boot
Posted: 2015/12/30 09:48:13
Hi guys,
I'm currently studying for the RHCE and one of the topics is system optimization. I'm trying to set "vm.swappiness" to a non-default setting.
First, I've created a swappiness.conf file in "/etc/sysctl.d" and removed the link pointing to the sysctl.conf file - on reboot it doesn't do it. (sysctl -p and systemctl restart systemd-sysctl works).
Then, I decided to revert all changes and enter vm.swappiness=<digit> in sysctl.conf file (with and without empty spaces around the "=") and after each reboot - swappiness was set to default.After a "systemctl restart systemd-sysctl or with "sysctl -p sysctl.conf" - everything seems to be ok.
I'm using CentOs 7.2 with kernel 3.10.0-327.3.1
I'm out of any ideas.
Thanks for your time reading this long post.
Best Regards,
Strahil Nikolov
I'm currently studying for the RHCE and one of the topics is system optimization. I'm trying to set "vm.swappiness" to a non-default setting.
First, I've created a swappiness.conf file in "/etc/sysctl.d" and removed the link pointing to the sysctl.conf file - on reboot it doesn't do it. (sysctl -p and systemctl restart systemd-sysctl works).
Then, I decided to revert all changes and enter vm.swappiness=<digit> in sysctl.conf file (with and without empty spaces around the "=") and after each reboot - swappiness was set to default.After a "systemctl restart systemd-sysctl or with "sysctl -p sysctl.conf" - everything seems to be ok.
I'm using CentOs 7.2 with kernel 3.10.0-327.3.1
I'm out of any ideas.
Thanks for your time reading this long post.
Best Regards,
Strahil Nikolov