Kernel Parameters
This post is building
Hi in this post I will try to explain a little bit about what is kernel parameters and that surrounds it and also how to implement this.
Kernel parameters are settings for change the default behavior of the kernel, someone change how the interface network interactive with the packages or another change how many mamory per page can be used, for example if you are a person that use redis on sometime you see the message or warning message explaining that you need change how many memory use per page and maybe a example using echo command for change a value at some directory in /sys.
And talking about directory for configure this value I need to explain how many way to change this value exists.
Well exists three way for change this parameters:
- When building the kernel
- At runtime from files
/proc/sys/and/sys/ - When starting the kernel
When building the kernel
Really I don’t have a lot experience building the kernel, maybe only I built the kernel maybe four time, maybe less, but if you are a person that like test new feature of news version of the kernel I’m sure that you change this parameters sometime. I use arch linux btw, then the best referent that I can share with you is the awesome wiki when explain diferents kernel and differents method for build the kernel: Kernel Compilation
At runtime from files /proc/sys/ and /sys/
This method is used if you want change some paramater when you have running the kernel and if the functionality of the change is allowed, sometime when a parameter is changed its necesary reboot the computer or restart process, services and more, and is more easy only restart the computer o instance if you use this change on cloud provider and is important keep mind that someone cloud providers not allowed this change.
Some example of how change this:
# echo "8192" > /proc/sys/net/core/somaxconn
with this command you can change how many connections accept the kernel
When starting the kernel
This method is used when you only want change the parameter before start the kernel and system and this change finish when power off or reboot the computer because if you want to use this method and keep the value you need modify the groub config otherwise this change will be forgotten. If you have a computer that use nvidia drivers or radeon driver and when started only watch a black secreen, well you probably needed use kernel parameter to force use some graphic drive nvidia, amd or generic drivers, or to force disable generic graphic drivers, for example change the value to the kernel parameter nomodeset or vga.
My configuration
The image post was create with clipdrop with prompt representation about to kernel parameters of linux kernel, digital photography, high resolution
References: