What are the best practices for kernel tuning with habitat? For example, if I wanted to set vm.overcommit_memory = 1 for redis.
I’ve come across this too, was thinking it wouldn’t be tooo crazy to try to do it from the init
hook, you just have to become conscious then of what you’re mixing together on a machine. Maybe add a section to the init hook for doing this that is disabled by default by a boolean config setting for whether to try to optimize kernel settings
Wouldn’t changing a kernel setting necessitate a restart to take effect?
For most kernel settings that’s not needed, including this one. So a combination of echo 1 > /proc/sys/vm/overcommit_memory
and sysctl -p
should do the trick.