0

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?

1 Answer 1

1

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:

http://www.kernel.org/doc/Documentation/sysctl/

4
  • 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, 2011 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? Apr 12, 2011 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, 2011 at 3:48
  • i did logout and log back in. I'll take a look at it again though. Thanks for your help! Apr 12, 2011 at 4:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .