[Beowulf] User resource limits

Chris Samuel csamuel at vpac.org
Sat Jun 14 00:25:56 PDT 2008


----- "David N Lombard" <dnlombar at ichips.intel.com> wrote:

> Note, mmap.c has been validating memory requests against RLIMIT_AS
> since at least 2.6.3 (earliest kernel sources I have online);

Yup, it was glibc that changed from using brk() all the
time to using mmap() for allocations > 128KB in 2.3.

Looking at mm/mmap.c it seems that sys_brk() only checks
RLIMIT_DATA, but I'm wondering if the call out to
find_vma_intersection() ends up calling may_expand_vm()
and hence enforce RLIMIT_AS as well ?

> 2.6.25 includes a /proc file "limits" that displays the limits
> (see fs/proc/base.c).

Now that could be really handy, here's an example output
from my home desktop:

$ cat /proc/$$/limits

Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            ms
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             71680                71680                processes
Max open files            1024                 1024                 files
Max locked memory         32768                32768                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       71680                71680                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

cheers,
Chris
-- 
Christopher Samuel - (03) 9925 4751 - Systems Manager
 The Victorian Partnership for Advanced Computing
 P.O. Box 201, Carlton South, VIC 3053, Australia
VPAC is a not-for-profit Registered Research Agency



More information about the Beowulf mailing list