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?

kakinada
  • 1
  • 2

1 Answers1

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/

Quinn Murphy
  • 463
  • 2
  • 8
  • 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 01: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 02: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 03: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 04:33