Note 323816 - AIX - User limit settings
Note 323816 - AIX - User limit settings
Symptom
Several different errors could result from too restricted OS resource limits (ulimits):
file too large
core file is truncated
no memory for space allocation
tp or R3trans run out of memory allocation
Segmentation fault in installation process
<and more>
Other Terms
resource limits, ulimits
Solution
In AIX, there are limits set on each user for the following:
cpu time per process
file size
data (heap) size per process
stack size per process
resident memory per process
core file size
number of open file descriptors
number of threads per process (from AIX 6.1 on)
processes per user (from AIX 6.1 on)
To be precise there exist “soft limits” which are the current active ones, and in addition “hard limits” as upper bounderies for
the soft limits.
They can be looked up via commands ‘ulimit –a –S’ and ‘ulimit –a –H’ respectively. If the specifier -S/-H is left away, the soft
limits are shown. For our purpose we focus mainly at the soft limits, so usually check via ’ulimit –a’.
The ulimit definitions are stored in the configuration file /etc/security/limits. It contains a ‘default’ section/stanza, and for
many users sections with explicit definitions. The default “hard limits” are shown in a comment at the file header. Actual
entries for hard limits are marked with an ending ‘_hard’, e.g. the entry ‘cpu_hard’ denotes the hard limit for a user’s cpu
time per process; without such marker an entry is specifying a soft limit. For a given user his explicit definitions override the
default settings. That is resulting in the user’s ulimit settings that apply at logon time, and will then be inherited to each newly
forked process, like shells and application processes.
Each process can change its own ulimits. If it’s a shell it can run some variant of the ‘ulimit’ command. Besides that each
process can programmatically call the OS API ‘setrlimit’. A regular user can change his soft limits within the boundaries of the
hard limits, and he can decrease his hard limits. A root user can change his limits in any way.
The root user can change each user’s ulimits via the ‘chuser’ command.
SAP:
For an SAP system you need to ensure that the ulimits for all SAP-related technical users are set the same or higher than
the following recommended settings. This includes the root user !
Reason is that a fresh SAP instance can be started either by the instance-user, like <sid>adm, via ‘sapstart’, or alternatively by
the root user via the sapinit script. The top-process of the process-hierarchy will be a ‘sapstartsrv’ process, so it defines the
ulimits for all later started (forked) processes.
Recommended settings:
data = unlimited
stack = unlimited
nofiles = 32000
Check in the configuration file /etc/security/limits (or from output of ‘ulimit –a –S/-H’ commands) that the soft limits are
configured properly, and that each hard limit is set the same or higher than its corresponding soft limit. Additionally take
into account any specification of ulimit settings in the SAP configuration file /usr/sap/sapservices.
Besides looking at the configuration values, also the active values in a started SAP instance can be identified, by
connecting to any work-process via SAP-GUI, transaction SA38/rsbdcos0 and running the command ‘ulimit –a’.
Miscellaneous:
The limitation of ‘core’ to 1 GByte is meant to avoid your file system containing the work directory to fill up unintentionally.
But in some occasions it might be useful to increase or remove that limit, when huge core files are expected to be created and
used for error investigation. Of course this implies providing enough file system space in the SAP work directory, or changing
the target directory for core dumps.
Please do not get irritated if on some environments the ‘stack’ setting shows a number ‘4194304’ (which denotes 4 GByte)
instead of ‘unlimited’, which is fine also.
Attributes
Key Value
Other Components Basis Components > Installation Tools (SAP Note 1669327) > Installation Unix (BC-INS-UNX)
1437105 BC-CST-STS
365314 BC-DB-DB6 DB2 UDB for AIX: User Limits for db2<sid>/<sid>adm
2187756 BC-CST-WDP SAP Web Dispatcher/ICM does not work due to the limit of OS open file descriptors
1904961 BC-DB-ORA BR0254E Memory allocation of d% bytes failed at location %s error when execute CheckDB from
DB13
2488554 BC-DB-LVC XSERVER Could not fork background proccess:Resource temporarily unavailable
2488624 BC-XI-CON-FIL PI File adapter: A file cannot be larger than the value set by ulimit
3043940 BC-CST-EQ ENQUE Server 2 does not accept connections due to limit of OS open file descriptors
1714491 BC-INS Obsolete: Inst.Systems Based on NW 7.0 / 7.0 EHP 1-3 - UNIX
1704753 BC-INS-UNX Inst.Systems Based on NetWeaver on UNIX - Using Software Provisioning Manager 1.0
966416 BC-INS-UNX OBSOLETE: Inst. SAP NetWeaver based on Kernel 7.10 - UNIX
1249364 BC-INS-UNX OBSOLETE: Inst. SAP NetWeaver based on Kernel 7.11 - UNIX
365314 BC-DB-DB6 DB2 UDB for AIX: User Limits for db2<sid>/<sid>adm