Open File Descriptor Calculator
Calculate open file descriptor usage against system and per-process ulimit thresholds.
About Open File Descriptor Calculator
Linux enforces two separate file descriptor ceilings: a per-process soft/hard limit set by ulimit -n (or /etc/security/limits.conf), and a system-wide ceiling set by the fs.file-max sysctl. A process hitting its per-process limit gets 'too many open files' errors even if the system as a whole has plenty of headroom, and vice versa — both usage percentages should be watched independently.
Formula
FD usage percentage
usage% = open_fds / max_fds × 100
Worked example
With the default values below, Open File Descriptor Calculator returns Per-Process FD Usage of 80.00%. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Currently Open File Descriptorsminimum 0
- 8,000
- Per-Process Max FDs (ulimit -n)minimum 1
- 10,000
- System-Wide Max FDs (fs.file-max)minimum 1
- 2,000,000
- System-Wide Currently Open FDsminimum 0
- 45,000
Results
- Per-Process FD Usage
- 80.00%
- System-Wide FD Usage
- 2.25%
- Per-Process FDs Remaining
- 2,000
- System-Wide FDs Remaining
- 1,955,000
- Status
- Warning — approaching FD limit
Step by step
- 1Values used
- 2FD usage percentage
- 3Per-Process FD Usage= 80.00
- 4System-Wide FD Usage= 2.25
- 5Per-Process FDs Remaining= 2,000
- 6System-Wide FDs Remaining= 1,955,000
- 7Status= Warning — approaching FD limit
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What causes 'too many open files' errors?
This error occurs when a process attempts to open a new file, socket, or pipe after already reaching its file descriptor limit (ulimit -n) — common in high-concurrency servers handling many simultaneous connections.
How do I raise the per-process file descriptor limit?
Set soft/hard limits in /etc/security/limits.conf (or a systemd unit's LimitNOFILE= directive for services), then have the process re-login or restart to pick up the new ulimit -n value.
How do I raise the system-wide file descriptor limit?
Increase fs.file-max via sysctl (sysctl -w fs.file-max=<value>, persisted in /etc/sysctl.conf), which caps the total file descriptors available to all processes on the host combined.
