0

If I run cat /proc/sys/fs/file-max it returns a value over 3,000,000 - but I can't set ulimit to more than 1,000,000. If I try I get -bash: ulimit: open files: cannot modify limit: Operation not permitted

(I have tried modifying /etc/security/limits.conf, /etc/sysctl.conf, /etc/pam.d/common-session per other found documentation - but if I set these to higher numbers, then my ulimit just drops down to 1024). I have the same experience on Ubuntu 16.04.6 LTS and Ubuntu 18.04.4 LTS.

Is the ulimit value based on memory, cpu, disk size or other? What is the formula for determining the file max value?

beetlejes
  • 1
  • 1
  • There's no "Ubuntu 16" or "Ubuntu 18". Which Linux distro have you installed (Ubuntu server, Ubuntu desktop, Kubuntu, Lubuntu, Xubuntu, Ubuntu MATE, Mint, et al.), & which release number? Different releases have different tools for us to recommend. Please click [edit] & add that to your question, so all facts we need are in the question. Please don't use Add Comment, since that's our one-way channel to you. All facts about your PC should go in the Question with [edit] – K7AAY May 18 '20 at 21:21
  • This has been asked several times. https://serverfault.com/questions/122679/how-do-ulimit-n-and-proc-sys-fs-file-max-differ 1024 is per file. File-max is per system – Wang May 20 '20 at 02:27
  • I have found a lot of articles that tell HOW to modify the values, but none that explain what these limits should be based on. Are open files limited by CPU? by Memory? – beetlejes Jun 05 '20 at 18:39

0 Answers0