On my system:
在我的系统上:
$ ulimit -n
1024
Some tools like GATK are aggressive in creating temporary files by creating more than 1000 files under /tmp/. This will cause the program to fail.
某些GATK之类的工具通过在/ tmp /下创建1000多个文件来积极创建临时文件。 这将导致程序失败。
How to increase the number of files allowed to be opened on Linux?
如何增加Linux上允许打开的文件数?
To increase the max number of open files to 10240, add these 2 lines to /etc/security/limits.conf
:
要将打开文件的最大数量增加到10240,请将这两行添加到/etc/security/limits.conf
:
* hard nofile 10240
* soft nofile 10240
The users may need to re-login to see the limits changed by:
用户可能需要重新登录才能查看更改的限制:
ulimit -n
You can also set more limits:
您还可以设置更多限制:
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory addressspace (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 (KB)
# - 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 values: [-20, 19]
# - rtprio - max realtime priority
翻译自: https://www.systutorials.com/how-to-increase-the-number-of-files-allowed-to-be-opened-on-linux/