View Single Post
  #5   (View Single Post)  
Old 22nd May 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Quote:
Originally Posted by EricM View Post
I am trying to set a memory limit so that any process using more then the limit I set gets killed or otherwise not allowed to allocate any more memory.

I followed the instructions on
http://www.freebsd.org/cgi/man.cgi?q...conf&sektion=5

edited /etc/login.conf

In the default class i changed
:memoryuse=unlimited:\
to
:memoryuse=150M:\

then run
cap_mkdb /etc/login.conf

I can still run processes that are using more then 150MB memory and nothing happens.

What did I do wrong?

Im running FreeBSD 6.0-RELEASE
from what i infer from the man pages, 'memoryuse' comes into play only when the system runs low on memory in which case the kernel will start paging out the processes which have exceeded their RLIMIT_RSS limit (see getrlimit(2)).
i reckon this could be used to prioritize/ration memory b/w apps for low memory situations.

if you want a cap on mem. then set limits for data, stack and virt. add. space usage.
Reply With Quote