Tuning Linux or UNIX operating system resource limits
You can improve the performance of a directory server instance if you tune the operating system resource limits.
You can tune the resource limits of the Linux™ or AIX® operating system that are necessary to support directories with millions of users.
- Resource limits on Linux and UNIX™ operating systems (
ulimit) -
On Linux and UNIX operating systems, the ulimit command controls the limits that can be set on system resource. You can modify the system resource, such as process data size, process virtual storage, and process file size.
On AIX operating systems, some limits might apply to the root user.
On Linux or UNIX operating system, resource limits are defined for each user. When you start a process, the process inherits or takes the resource limits of the user context under which it was started.
For example, if you start the
idsslapdprocess under the root user context, theidsslapdprocess takes the resource limits of the root user. This inheritance occurs even if the process switches user contexts as theidsslapdprocess does.The
idsslapdprocess switches the user context to the DB2® instance owner. For theidsslapdprocess to take the resource limits of the DB2 instance owner, you must start theidsslapdprocess as the DB2 instance owner. - Resource limits on AIX operating system
-
On AIX system, you can consider the following options when you set the resource limits:
- Applying AIX settings
- Setting process limits in IBM® Security Verify Directory, version 6.2 and later
- Setting process limits in IBM Security Verify Directory, version 6.1 and earlier
- Creating file systems with large file support
- Setting the environment variables
- Applying AIX settings
-
In AIX, system settings take effect when you restart the shell program. Operations, such as
su -,login, and a process restart, effects the modified system settings;sudoesdoes not effect the settings. You can test resource limits by running the ulimit command and restarting the affected processes. - Setting process limits in IBM Security Verify Directory, version 6.2 and later
-
In IBM Security Verify Directory, version 6.2 and later, set the
ulimitvalues with the values that are set under thecn=Ulimits, cn=Configurationentry in the configuration file. An example of thecn=Ulimits, cn=Configurationentry in the instance configuration.dn: cn=Ulimits, cn=Configuration cn: Ulimits ibm-slapdUlimitDataSegment:262144 ibm-slapdUlimitDescription: Prescribed minimum ulimit option values ibm-slapdUlimitFileSize:2097152 ibm-slapdUlimitNofile:500 ibm-slapdUlimitStackSize: 10240 ibm-slapdUlimitVirtualMemory:1048576 objectclass: top objectclass: ibm-slapdConfigUlimit objectclass: ibm-slapdConfigEntry - Setting process limits in IBM Security Verify Directory, version 6.1 and earlier
-
To check the current process data size and virtual memory size limits, you must run the following command:
ulimit -d ulimit -mYou must set the process data size and virtual storage size to unlimited. To set the size to unlimited, modify the /etc/security/limits file for the following entries:
data = -1 rss = -1For the changes to the /etc/security/limits file to take effect, you must log out of the current session and log again.
At the minimum, you must set the size limits to 256 MB. Set the value to 256000 in the /etc/security/limits file. Increase the limits if you are using a cache that is larger than the default value.
The process virtual storage size is limited by the number of segments that a process can use. By default, a process can use only one memory segment, which limits it to 128 MB. AIX supports a large memory model that can be set by using the LDR_CNTRL environment variable.
- Creating file systems with large file support
-
The standard file system on AIX has a 2-GB file size limit, regardless of the
ulimitsetting.You can enable files larger than the 2-GB limit by the following methods:
- Create the file system as Enhanced Journaled file system or JFS2. This option is available in AIX, version 5.2 and later versions.
- Create the file system with the Large File Enabled option. You can find this option through Add a Journaled file system of the smit menu.
For information and file system options, see the AIX documentation.
- Setting the environment variables
-
The environment variable,
SPINLOOPTIME=650, for SMP systems improves the performance of a directory server.You can set the environment variables in the following ways:
- Temporarily define the environment variables before you start
the server, then undefine them. For example:
export SPINLOOPTIME=650 ibmslapd unset SPINLOOPTIME - Pass the environment variable on the server start command. For
example:
SPINLOOPTIME=650 ibmslapd - For a directory server, set the environment variables in the slapd32.conf or ibmslapd.conf configuration files.
- Define the variables in the /etc/environment file.
For the environment variables in the /etc/environment file to take effect, you must log off and log in again before you start the server. The advantage of this approach is that it is automatic and it reducing the possibility of an error.
The disadvantage is the potential to affect other processes in the system. By the setting of these environment variables, currently there are no known processes that are detrimentally affected.
- Temporarily define the environment variables before you start
the server, then undefine them. For example: