[torquedev] ulimit/setrlimit doesn't enforce RLIMIT_DATA on Linux

Christopher Samuel samuel at unimelb.edu.au
Thu Oct 21 19:18:28 MDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/10/10 03:00, "Mgr. Šimon Tóth" wrote:

> I can confirm this issue (specifically it seems to be a
> problem of mmap not enforcing RLIMIT_DATA).

This came up on the lists back in 2007, the issue is that:

a) only p* limits makes sense for RLIMIT_* restrictions,
   others need to be (currently) monitored for by pbs_mom
   (though cgroups could be used to enforce some of the limits).

b) glibc 2.3 changed to use mmap() for allocations over a
   configurable limit, see here for my blog at the time:

http://www.csamuel.org/2007/11/30/linux-ulimit-memory-enforcement-oddity

As you've spotted the LInux kernel mmap() does not enforce
RLIMIT_DATA, only RLIMIT_AS which in turn means only pvmem
will enforce memory usage limits at present.

Hey ho..

cheers,
Chris
- -- 
 Christopher Samuel - Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computational Initiative
 Email: samuel at unimelb.edu.au Phone: +61 (0)3 903 55545
         http://www.vlsci.unimelb.edu.au/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzA5mQACgkQO2KABBYQAh8AZQCeNfjP7ACb3lZZqkk1eKSqZcVy
+gAAnjMS9lUUYaplgntg1VfDlCeCKGuT
=HXlm
-----END PGP SIGNATURE-----


More information about the torquedev mailing list