[Beowulf] User resource limits

Perry E. Metzger perry at piermont.com
Mon Jun 9 09:53:41 PDT 2008


Prentice Bisbal <prentice at ias.edu> writes:
> I would like to impose some CPU and memory limits on users that are hard
> limits that can't be changed/overridden by the users. What is the best
> way to do this? All I know is environment variables or shell commands
> done as the user (ulimit, for example).

ulimit is not quite "a command done by the user". The user manipulates
their ulimits with the shell ulimit command, but the limits are in
fact maintained by the kernel, and can be set by the administrator at
maximum levels that the user cannot reduce.

Read the man page for getrlimit/setrlimit for details on this.

ulimits are inherited by a process from its parents, so if the process
used at login (like sshd) sets them appropriately, the limits are
inherited by the whole session.

The administrator can set default ulimit ceilings in various login
configuration files -- the file that is used depends on the specific
OS you are running. If you say what OS and/or distro you are using, I
can be of more specific help.

Perry



More information about the Beowulf mailing list