将资源限制设置到 /etc/security/limits.d/tidb.conf
中,对 tidb 用户是生效的。但是,无法被 tiup 部署工具读取。必须要全局设置(/etc/security/limits.conf
),才可被 tiup 读取。但是,在部署oracle时,无论全局设置,还是 /etc/security/limits.d/
目录中设置,均可被 oracle 安装程序读取到。
[tidb@h200 ~]$ id
uid=1001(tidb) gid=1001(tidb) groups=1001(tidb),10(wheel)
[tidb@h200 ~]$ cat /etc/security/limits.d/tidb.conf
tidb soft nofile 1000000
tidb hard nofile 1000000
tidb soft stack 32768
tidb hard stack 32768
[tidb@h200 ~]$ ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 13499
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1000000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 32768
cpu time (seconds, -t) unlimited
max user processes (-u) 13499
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited