Wednesday, April 5, 2023

Changing memlock Inside limits.conf is Not Taking Effect


I'm trying to change memlock parameter inside /etc/security/limits.conf from default 134217728 to 220200960, but it's not taking effect:

The parameter setting inside limits.conf was changed to 220200960

 But after I relogin with a new session to oracle user, I can see the value is still the default (unchanged):


Package oracle-database-preinstall-19c was already installed on the system and its config file setting /etc/security/limits.d/oracle-database-preinstall-19c.conf takes precedence against the default system file /etc/security/limits.conf


[root@srv1 ~]# cat /etc/security/limits.d/oracle-database-preinstall-19c.conf | grep memlock
# oracle-database-preinstall-19c setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM
oracle hard memlock
# oracle-database-preinstall-19c setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM
oracle soft memlock


Either change the memlock value inside /etc/security/limits.d/oracle-database-preinstall-19c.conf or simply delete it to avoid any confusion with the default system limits.conf file.

I would prefer to compare the settings first between oracle-database-preinstall-19c.conf and limits.conf then rename oracle-database-preinstall-19c.conf to any different name:

# mv /etc/security/limits.d/oracle-database-preinstall-19c.conf   /etc/security/limits.d/oracle-database-preinstall-19c.conf.old

After login to a new oracle session, I can see the configurations in limits.conf file are now taking effect:

No comments:

Post a Comment