Limits

Back to Unix

Unix systems put various sensible limits on the use of different resources. Open files, number of processes, locked files, cpu usage, etc can be limited.

/proc/*/limits

shows the current limits set for a running process. These limits are set based on a number of possible configuration locations.

ulimit

Utility for setting limits at a user-level for system-wide resource usage, which is useful for shared systems. These are limits for the sum of all processes owned by a user.

/etc/security/limits.conf

Part of linux's pam_limits, the persistent ulimits configuration file. Sets for logged in users, not for system processes

pam_limits are enforced when a session is opened. They do not affect daemon processes

/etc/sysctl.conf

Contains system-wide configurations, kernel-level configurations

source for file descriptors limit