Sample : limits.conf - Linux Oracle database


change the limits.conf for dba group , as both app* and ora* users are part of that group

/etc/security/limits.conf
@dba            soft    nofile          65536
@dba            hard    nofile          65536
@dba            soft    nproc           16384        ( for big systems make this 65536)
@dba            hard    nproc           16384       ( for big systems make this 65536)
@dba            soft    stack           16384
@dba            hard    stack           16384
@dba            soft    memlock         3145728       (=hugepages * 2048) = 
@dba            hard    memlock         3145728


change the value to unlimited in /etc/security/limits.d/90-nproc.conf

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     unlimited       ß change to unlimited or add it for users
root       soft    nproc     unlimited

please make sure that these are appended at end of file and either remove the values set for ora* and app* users or increase them to match same as dba group.

If values are set at user level they will override the group values. So lets just keep one to avoid conflicts.

--------------------------------------------------------------------------------------------------------------
calculate memlock :
$ grep vm.nr_hugepages /etc/sysctl.conf

vm.nr_hugepages=20480


cat proc/meminfo | grep -i hugepages

AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB


For that following calculation:

Number Hugepages * Hugepagesize = minimum Memlock

Following example:
20480 * 2048 = 41943040

$ vi /etc/security/limits.conf

oracle soft memlock 41943040
oracle hard memlock 41943040

Comments