System-wide File Descriptor Limit
-
Get current value:
sysctl fs.file-max
-
modify max fd limit:
sysctl -w fs.file-max=10000
User File Descriptor Limit
-
Get current value:
ulimit -n
-
modify max fd limit:
ulimit -n 10000
-
use
ulimit -a
to print all limits of a user, such as fd, processes, etc.
Based on http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
Ref:
http://unix.stackexchange.com/questions/29577/ulimit-difference-between-hard-and-soft-limits http://ss64.com/bash/ulimit.html