I've been doing some experiments with the python resource module and the
setrlimit command to set resource limits on processes. I've found
something very interesting: it seems that on OSX (10.6.8), there is no
way to have a hard cap on the amount of memory a process uses, at least
no way that I can find. The RLIMIT_AS category for resource limits on
OSX is an alias for RLIMIT_RSS (see /usr/include/system/resources.h, and
note that RLIMIT_AS does not appear in the setrlimit manpage). However,
on Linux (at least the linux running on boxen), RLIMIT_AS *does* seem to
put a hard cap on the amount of memory a process can use, and the
process fails if it tries to use more memory than that.
So, the takeaway: be careful when running public sage notebook servers
on OSX, since you can't specify a maximum memory hard cap for a process.
On the other hand, maybe I'm misunderstanding something. Does anyone
know how to set a hard memory cap on OSX?
Thanks,
Jason
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org