Tuesday, April 12, 2011

Tuning network and vm settings on CentOS Linux servers with ktune

While poking around the CentOS package repository, I came across the ktune package. Ktune comes with a set of kernel tunables that are useful for network and disk intensive workloads, and provides the ktune service to apply these settings during system startup. Ktune includes settings for TCP/IP buffers, setting the deadline scheduler as the default I/O scheduler, and entries to adjust the swappiness, dirty_ratio and pagecache settings. The full list of tunables can be viewed by paging through the following two configuration files:
$ less /etc/sysctl.ktune
$ less /etc/sysconfig/ktune
To activate the settings, you can enable the ktune service with the chkconfig and service utilities:
$ chkconfig ktune on
$ service ktune start
Saving current sysctl settings:                            [  OK  ]
Applying ktune sysctl settings from /etc/sysctl.ktune:     [  OK  ]
Applying sysctl settings from /etc/sysctl.conf:            [  OK  ]
Applying deadline elevator: sda                            [  OK  ]


This is an awesome package, and I definitely plan to use the network settings on all of my CentOS hosts.

Courtesy : http://prefetch.net/blog/index.php/2009/04/26/performance-tuning-linux-servers-with-ktune/