What is an allowed ulimit value based on?

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?

3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like