Chr*_*lan 27 linux limit files
我正在为我的 oracle 用户调整该nofile值,但/etc/security/limits.conf我对其行为有疑问:是否nofile限制了用户可以为其所有进程打开的文件总数,或者是否限制了用户可以拥有的文件总数为每个进程打开?
具体来说,用于以下用途:
oracle hard nofile 65536
Run Code Online (Sandbox Code Playgroud)
Gil*_*il' 27
中的大多数值¹limits.conf是可以使用ulimitshell 命令或setrlimit系统调用设置的限制。它们是过程的属性。这些限制独立适用于每个过程。特别是,每个进程最多可以nofile打开文件。用户进程累积的打开文件数量没有限制。
The nproc limit is a bit of a special case, in that it does sum over all the processes of a user. Nonetheless, it still applies per-process: when a process calls fork to create a new process, the call is denied if the number of processes belonging to the process's euid is would be larger than the process's RLIMIT_NPROC value.
该limits.conf手册页解释说,限制适用于会话。这意味着会话中的所有进程都将具有这些相同的限制(除非被这些进程之一更改)。这并不意味着对会话中的进程进行任何求和(这甚至不是操作系统跟踪的东西——有会话的概念,但它比这更细粒度,例如每个 X11 应用程序往往会结束在它自己的会话中)。它的工作方式是登录进程为自己设置一些限制,并且它们被所有子进程继承。
¹例外是maxlogins、maxsyslogins和chroot,它们作为登录过程的一部分应用以拒绝或影响登录。
| 归档时间: |
|
| 查看次数: |
18194 次 |
| 最近记录: |