Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5990781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:17:35+00:00 2026-05-22T23:17:35+00:00

Need to calculate optimum ulimit and fs.file-max values according to my own server needs.

  • 0

Need to “calculate” optimum ulimit and fs.file-max values according to my own server needs.
Please do not conflict with “how to set those limits in various Linux distros” questions.

I am asking:

  1. Is there any good guide to explain in detail, parameters used for ulimit? (> 2.6 series kernels)
  2. Is there any good guide to show fs.file-max usage metrics?

Actually there are some old reference i could find on the net:
http://www.faqs.org/docs/securing/chap6sec72.html
“something reasonable like 256 for every 4M of RAM we have: i.e. for a machine with 128 MB of RAM, set it to 8192 – 128/4=32 32*256=8192”

Any up to date reference is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:17:35+00:00Added an answer on May 22, 2026 at 11:17 pm

    For fs.file-max, I think in almost all cases you can just leave it alone. If you are running a very busy server of some kind and actually running out of file handles, then you can increase it — but the value you need to increase it to will depend on exactly what kind of server you are running and what the load on it is. In general you would just need to increase it until you don’t run out of file handles any more, or until you realize you need more memory or more systems to handle the load. The gain from “tuning” things by reducing file-max below the default is so minimal as to not be worth thinking about — my phone works fine with an fs-max value of 83588.

    By the way, the modern kernel already uses a rule of thumb to set file-max based on the amount of memory in the system; from fs/file_table.c in the 2.6 kernel:

        /*
         * One file with associated inode and dcache is very roughly 1K.
         * Per default don't use more than 10% of our memory for files. 
         */ 
    
        n = (mempages * (PAGE_SIZE / 1024)) / 10;
        files_stat.max_files = max_t(unsigned long, n, NR_FILE);
    

    and files_stat.max_files is the setting of fs.file-max; this ends up being about 100 for every 1MB of ram.

    ulimits of course are about limiting resources allocated by users or processes. If you have multiple users or another situation like that, then you can decide how you want to divide up system resources and limit memory use, number of processes, etc. The definitive guide to the details of the limits you can set is the setrlimit man page (and the kernel source, of course).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to calculate word frequencies of a given set of adjectives in a
I need to calculate Tanh-1 in C# (and Sinh-1 and Cosh-1) I did not
I need to calculate date difference using flowing query but it does not work.
I need to calculate the elapsed time (nicely formatted) between now and a file's
We need to calculate driving distances for records in a SQL Server database, so
I need to calculate the minimum and maximum UV values assigned to the pixels
We need to calculate a hash of a mp3 file to uniquely identify it.
I need to calculate the time till Christmas in milliseconds. I'm using joda time
I need to calculate the total of an invoice. This invoice is created with
I need to calculate (in R) the number of positive and negative runs in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.