User resource limits


Many UNIX systems provide a ulimit command that can be used to set maximum usage of virtual memory resources, individual file sizes (as distinct from quotas, which restrict total file usage), and some other limits. The ulimit command is usually built into shells, since it changes settings in the running process (hence a separate ulimit executable would just change its own settings and exit without affecting anything else).

Typically ulimit settings have a hard limit and a soft limit; a normal user can only lower the hard limit and only root can raise a hard limit, while normal users can adjust the soft limit up to the maximum allowed by the hard limit.

ulimit is usually most helpful for restricting resource usage of certain programs services and not so useful for limiting user accounts. In particular unless you have a good idea of the virtual memory usage of all the applications your users are likely to run, setting virtual memory limits too low will cause applications to fail.


Steve VanDevender
Last modified: Wed Jul 23 12:47:33 PDT 2003