Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is the output of ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

This is a 64bit install, and I would like to increase the max-open files from 1024 to a more heady limit such as 5000. Will that be any problem? Will it cause instability?


share|improve this question
up vote 3 down vote accepted

max-open is number of files one user can keep open in single session simultaneously.

Also, please note that all limit settings are set per login. They are not global, nor are they permanent; existing only for the duration of the session.

(from man limits.conf(5))

Safe value for maximum number of really depends on your usage. Point with default values is to prevent trivial (accidental) denial of services. There is also global limit for number of open files:

cat /proc/sys/fs/file-max

You can change that number by running for example

echo 100000 > /proc/sys/fs/file-max

(with user root, obviously). Even better is to also add line fs.file-max = 10000 to /etc/sysctl.conf to load same setting after reboot.

As of ulimit: it's safe to increase that number. However, number of open files should not exceed global file-max, because then opening new files is not possible anymore (and for example logging in requires opening files).

If there is multiple users, remember that if you change the default, everyone can open more files. For example 30 users * 5000 files = 150 000 open files (assuming that everyone opens maximum number of files, and uses only single session). If you have some really resource hungry (as in opens really many files) software used by multiple users, it might be a problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.