How to Tuning 389 Directory Server on CentOS 6.2

Share this Article :

This post will share with you on how to perform system tuning analysis for 389 Directory Server on linux CentOS 6.2 server. 389 Directory Server is an enterprise-class open source LDAP server for Linux. It is based on Fedora Directory Server. This post assumed that your CentOS server has been completely installed 389 Directory Server using EPEL repository. Before start to configure the 389 Directory Server, it is better to adjust some performance and security settings. Follow the following steps to tuning the 389 Directory Server on CentOS 6.2.

Also Read :   How to Fix "Warning: RPMDB altered outside of yum."

1. Perform TCP Tuning :

a) Decrease the time default value for tcp_keepalive_time connection. Edit the /etc/sysctl.conf file and add the following lines to the bottom of sysctl.conf.

[root@centos62 ~]# vi /etc/sysctl.conf
#Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 300

b) Increase number of local system ports available by editing this parameter in the /etc/sysctl.conf file :

[root@centos62 ~]# echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf

Show changes :

[root@centos62 ~]# cat /etc/sysctl.conf | grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 1024 65000

2. Perform File Tuning :

a) Increase the file descriptors by running these commands:

[root@centos62 ~]# echo "64000" > /proc/sys/fs/file-max

Show changes :

[root@centos62 ~]# cat /proc/sys/fs/file-max
64000

or
Simply run this command :

[root@centos62 ~]# echo "fs.file-max = 64000" >> /etc/sysctl.conf

Show changes :

[root@centos62 ~]# cat /etc/sysctl.conf | grep fs.file-max
fs.file-max = 64000

b) Edit /etc/profile as below :

[root@centos62 ~]# echo "ulimit -n 8192" >> /etc/profile

Show changes :

[root@centos62 ~]# cat /etc/profile | grep ulimit
ulimit -n 8192

c) Edit the file descriptors in /etc/security/limits.conf. Add two parameter at the bottom of the configuration file :

[root@centos62 ~]# vi /etc/security/limits.conf
# End of file
* soft nofile 524288
* hard nofile 524288

3. Directory Server Tuning :

Also Read :   How to Disable SELinux on RHEL 7/CentOS 7/Oracle Linux 7

a) Edit /etc/sysconfig/dirsrv and uncomment “ulimit -n 8192”

[root@centos62 ~]# cat /etc/sysconfig/dirsrv | grep ulimit
# hard limits are raised, then use ulimit - uncomment
# ulimit -n 8192

Edit as below :

[root@centos62 ~]# vi /etc/sysconfig/dirsrv
# In order to make more file descriptors available
# to the directory server, first make sure the system
# hard limits are raised, then use ulimit - uncomment
# out the following line and change the value to the
# desired value
ulimit -n 8192

4. Sufficient Memory Assigned :

Make sure you have assign or upgrade the physical memory to at least 1024MB.


Leave a Reply