Khi viết Bash script cấu hình Oracle database 21c xài Huge page trên Linux chạy tự động 100% chúng tôi gặp lỗi sau:
User oracle khi đăng nhập vào môi trường GNOME trên Red Hat Enterprise Linux 8 và các bản ăn theo như AlmaLinux 8, Rocky Linux 8, Oracle Linux 8… không nhận được memlock đã cấu hình trong /etc/security/limits.d/oracle-database-preinstall-21c.conf.
Mặc dù đã cài gói oracle-database-preinstall-21c với cấu hình memlock là 128GB cho user oracle.
cat /etc/security/limits.d/oracle-database-preinstall-21c.conf
# oracle-database-preinstall-21c setting for nofile soft limit is 1024
oracle soft nofile 1024
# oracle-database-preinstall-21c setting for nofile hard limit is 65536
oracle hard nofile 65536
# oracle-database-preinstall-21c setting for nproc soft limit is 16384
# refer orabug15971421 for more info.
oracle soft nproc 16384
# oracle-database-preinstall-21c setting for nproc hard limit is 16384
oracle hard nproc 16384
# oracle-database-preinstall-21c setting for stack soft limit is 10240KB
oracle soft stack 10240
# oracle-database-preinstall-21c setting for stack hard limit is 32768KB
oracle hard stack 32768
# oracle-database-preinstall-21c setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM
oracle hard memlock 134217728
# oracle-database-preinstall-21c setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM
oracle soft memlock 134217728
# oracle-database-preinstall-21c setting for data soft limit is 'unlimited'
oracle soft data unlimited
# oracle-database-preinstall-21c setting for data hard limit is 'unlimited'
oracle hard data unlimited
Thông tin gói oracle-database-preinstall-21c đã cài trên Oracle Linux 8.
yum info oracle-database-preinstall-21c
Last metadata expiration check: 19:35:10 ago on Fri 19 Apr 2024 07:22:13 PM +07.
Installed Packages
Name : oracle-database-preinstall-21c
Version : 1.0
Release : 1.el8
Architecture : x86_64
Size : 76 k
Source : oracle-database-preinstall-21c-1.0-1.el8.src.rpm
Repository : @System
From repo : @commandline
Summary : Oracle Database Preinstallation RPM
License : GPLv2
Description : The Oracle Database Preinstallation RPM automatically installs any additional
: packages needed for installing Oracle Grid Infrastructure and Oracle Database
: and configures your server operating system automatically, including setting
: kernel parameters and other basic operating system requirements for install.
Available Packages
Name : oracle-database-preinstall-21c
Version : 1.0
Release : 1.el8
Architecture : src
Size : 31 k
Source : None
Repository : ol8_appstream
Summary : Oracle Database Preinstallation RPM
License : GPLv2
Description : The Oracle Database Preinstallation RPM automatically installs any additional
: packages needed for installing Oracle Grid Infrastructure and Oracle Database
: and configures your server operating system automatically, including setting
: kernel parameters and other basic operating system requirements for install.
Khi user oracle login vào môi trường text mode thì nhận được memlock 128GB bình thường như đã cấu hình.
Linux text mode còn gọi là multi-user.target theo cách gọi của systemd hay runlevel 3 theo cách gọi của SysVinit.
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 15400
max locked memory (kbytes, -l) 134217728
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited