Saturday, June 20, 2015

System performance - Kernel tuning

Note: There might be a situation where you might have to reboot your system to make these parameters effective.

Before making any kernel related changes, make sure to verify system related issues, such as

1. Verify the cpu/memery available on the system and how they are used. use top , free
2. Verify filesystem lay out, io activities. df -h , fdisk -l, iostat
4. Verify authentication process, are u using local, NIS or LDAP authentication, review ur set up.
5. Verify the network performance and connectivity.
6. Verify the database verision and plugins and patch levels.
7. Work with network, storage team to find the root cause of the slowness along with your own deep analysis of your own system.
8. If you have disaster recovery set up, verify how your data replication is set up.

Linux Kernel Tuning
sysctl command is sued to setup or display the current kernel parameters.
# sysctl –a | more

Here is the example fo changing the vlaue of swappiness from 60 to 20.
# sysctl –a | grep swapp
vm.swappiness = 60
Note: The active kernel parameters are listed in /proc/sys directory
# ls /proc/sys
abi  crypto  debug  dev  fs  kernel  net  sunrpc  vm
1. Display the current swappiness value
# cat /proc/sys/vm/swappiness
2. Change the value temporarily.
# echo “20”  >  /proc/sys/vm/swappiness
# sysctl –w vm.swappiness = 20
3. To make the change permanent, edit /etc/sysctl.conf and append the line on the config file.
# cp -p /etc/sysctl.conf  /etc/sysctl.conf.todaysdate
# vi /etc/sysctl.conf

  vm.swappiness = 20
4. Run sysctl command to load the new value
# sysctl  -p
5. Verify the change
# sysctl vm.swappiness
vm.swappiness = 20
# sysctl –a | grep swappiness
vm.swappiness = 20
# cat /proc/sys/vm/swappiness

No comments:

Post a Comment