Oracle RAC - profile.local
Oracle RAC Solution · Config document · referenced from Operating system preparation
ulimit -p lines are commented out (the notes say only that they had to be), and the shell test is not the one of the installation guide. Read the explanation below before copying.The system-wide profile addition that raises the limits of open files and processes in the login shells of oracle and grid. On SLES /etc/profile reads /etc/profile.local if it exists, so the file applies to bash and ksh logins of every user and filters by $USER itself.
| Item | Value |
|---|---|
| Path | /etc/profile.local |
| On | oradb01 and oradb02 |
| Shown here | the whole file |
| Owner and mode | mode 644, set with chmod 644 /etc/profile.local; the owner is not recorded |
| Activated with | the next login of the account |
| Operating system | SUSE Linux Enterprise Server 11 SP3 |
The file
# System-wide environment settings for running Oracle Database (BASH interpreter) if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/bash" ]; then # I HAD TO COMMENT THIS OUT ulimit -p 131072 ulimit -n 131072 else ulimit -u 131072 -n 131072 fi fi if [ $USER = "grid" ]; then if [ $SHELL = "/bin/bash" ]; then # I HAD TO COMMENT THIS OUT ulimit -p 131072 ulimit -n 131072 else ulimit -u 131072 -n 131072 fi fi
| Line | Effect |
|---|---|
if [ $USER = "oracle" ] | the block applies to one account; the second block repeats it for grid |
if [ $SHELL = "/bin/bash" ] | bash logins take the first branch |
the commented ulimit -p 131072 | "I had to comment this out" is my remark of the time, kept as it is |
ulimit -n 131072 | soft limit of open files, for bash |
ulimit -u 131072 -n 131072 | processes and open files, for every other shell |
The file is a variation of an older Oracle snippet, which the user profiles in the .bash_profile of oracle repeat with the original numbers. That snippet tests for /bin/ksh in the first branch and uses ulimit -p there, meant as the process limit. This file tests for /bin/bash instead. In bash -p is the pipe buffer size, which cannot be set. That is today's explanation; the notes say only that the line had to be commented out. The result is that a bash login raises only the number of open files here; the process limit of 131072 comes from limits.conf, Oracle block alone. The values are the ones of that file, not the 16384 and 65536 of the guide.
$USER and $SHELL are not quoted in the tests; with an empty variable the test would print an error. The quotes around the strings are plain ASCII quotes here, unlike in the user profiles written later.
Checked against bash, ksh and Oracle AI Database 26ai
| As built | Today |
|---|---|
/etc/profile.local | Still SUSE's hook for local additions: /etc/profile sources it if it is not empty |
ulimit -p under bash | In bash -p is the pipe buffer size and cannot be set; the process limit is -u. That is why the line failed |
ulimit -p in Oracle's snippet for ksh | -p means processes only in the pdksh family, such as mksh. In ksh93, which is the ksh of SLES 11, -p is the pipe buffer size as well, so the original snippet was wrong there too |
| limits raised in a profile | Not in the 11.2.0.4-era or current guides, which set limits in limits.conf only and check them with ulimit -Sn, -Hn, -Su, -Hu, -Ss and -Hs |
The file is unnecessary once limits.conf sets soft and hard limits to the same value, which limits.conf, Oracle block does. I would not create it again.