CentOS Performance Tuning Checklist

1. Maximum Number of open files.

The default configuration for maximum open files allowed per process on CentOS is set at a very low number (1024), so let’s change this to 100K

Add the following 2 lines to the end of limits.conf file.

# vi /etc/security/limits.conf
*   soft   nofile    100000
*   hard   nofile    100000

Run ulimit -n to change the current runtime value of max open files.

ulimit -n 100000

2. Turn off filesystem access times.

/dev/sda1       /   xfs	defaults 0 0

Change it to

/dev/sda1       /   xfs	defaults,noatime,nodiratime	0 0

3. Change default I/O Scheduler

echo "noop" > /sys/block/sda/queue/scheduler
vi /etc/rc.local
# Add the following line to the end of the file.
echo "noop" > /sys/block/sda/queue/scheduler
chmod a+x /etc/rc.local