I set sysctl fs.file-max = 4500000. However, ulimit still shows open files (-n) 1024

I understand that both values point to the max open file descriptors. How do I make ulmit respect the sysctl value?

Is there any documentation on the meanings of the various values of sysctl?


if what you are looking for is a permanent set to the ulimit, you'll want to add the line

ulimit -n 4500000

to /etc/profile (source /etc/profile afterwards to see change).

As for finding the meaning of systctl, you can find detailed information here:


  • 1
    Not quite. You are better off setting the value in /etc/security/limits.conf (depending on distro). While setting it in /etc/profile will work, the next sysadmin to come after you won't be expecting it there. – devicenull Apr 12 '11 at 1:44
  • I've tried setting in /etc/security/limits.conf but could not get ulimit -n to return what I set in the file. Is there an extra step I was missing? – Quinn Murphy Apr 12 '11 at 2:15
  • Did you log out and log back in? The values in limits.conf are only applied during new logins. – devicenull Apr 12 '11 at 3:48
  • i did logout and log back in. I'll take a look at it again though. Thanks for your help! – Quinn Murphy Apr 12 '11 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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