Trying to permanently change some vm kernel parameters, I created /etc/sysctl.d/01-custom.conf config file as it described in Red Hat knowledgebase article. Here is its content:
# cat /etc/sysctl.d/01-custom.conf
vm.swappiness=10
vm.dirty_ratio=20
vm.vfs_cache_pressure=200
But after reboot only vm.vfs_cache_pressure is changed and swappines and dirty_ratio have previous values.
# sysctl vm.swappiness
vm.swappiness = 30
# sysctl vm.dirty_ratio
vm.dirty_ratio = 30
In /etc/sysctl.conf file there is no changes for vm.dirty_ratio parameter and vm.swappines is set to 10 as well. Does it mean that the system takes these values from somewhere else?
There are no any config files under /etc/sysctl.d besides mine and link to /etc/sysctl.conf:
# ll /etc/sysctl.d/
total 4
-rw-r--r-- 1 root root 147 May 30 04:40 01-custom.conf
lrwxrwxrwx. 1 root root 14 Apr 3 15:00 99-sysctl.conf -> ../sysctl.conf
Update:
sysctl --system shows that values from my config were taken. Nothing for vm.swappines and vm.dirty_ratio are set to 30.