Introduction to Linux Kernel Tuning: Kernel Parameters and Their Impact
Hosni Zaaraoui
Linux Enthusiast, System Administrator | Linux, Bash Scripting, Networking
In this final part, we will explore various kernel parameters and their impact on system performance. Adjusting these parameters allows for fine-tuning your Linux system to achieve optimal performance and stability.
Common Kernel Parameters to Tune
Swappiness:
sudo sysctl vm.swappiness=10
Anonymous page: dynamic runtime data such as stack and heap
FS (Filesystem) page: Payload such as application data, shared libs etc.
For more details, check out this link : hana systems linux swappiness
File Descriptor Limits:
sudo sysctl fs.file-max=100000
Dirty Ratio:
sudo sysctl vm.dirty_ratio=15
sudo sysctl vm.dirty_background_ratio=5
I/O Scheduler:
echo noop | sudo tee /sys/block/sda/queue/scheduler
领英推荐
TCP/IP Parameters:
sudo sysctl net.ipv4.tcp_fin_timeout=30
sudo sysctl net.core.netdev_max_backlog=5000
Applying and Persisting Kernel Parameters
Applying Changes:
sudo sysctl -p
Persisting Changes:
sudo nano /etc/sysctl.conf
vm.swappiness=10
fs.file-max=100000
vm.dirty_ratio=15
vm.dirty_background_ratio=5
net.ipv4.tcp_fin_timeout=30
net.core.netdev_max_backlog=5000
Conclusion
By understanding and tuning kernel parameters, you can significantly enhance the performance and stability of your Linux system. Adjusting parameters like swappiness, file descriptor limits, and I/O schedulers allows for a tailored approach to system optimization.
Key points covered:
With these tuning techniques, you can achieve a more efficient and responsive Linux system. Always test changes in a controlled environment before applying them to production systems.
Stay tuned for more Linux performance tuning and system optimization tips!
?