这个问题可能之前就有人问过,但我没有找到任何支持的答案。我知道它ulimit
支持几个选项,其中max memory size
之一就是。如何使用/etc/security/limits.conf
文件设置相同的选项?
我认为在文件中设置virtual memory
选项limits.conf
与不一样max memory size
。
此外,我知道我可以编辑用户的.bashrc
文件来限制使用资源ulimit
,例如,ulimit -m <mem in Kb>
但用户可以随时更改这些值。
以下哪一个limits.conf
相当于ulimit -m
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority