[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limiting userland RAM utilization

On Mon, Apr 10, 2006 at 07:18:02PM -0700, Michael Favinsky wrote:
> I have a userland process that once in a while goes haywire and starts
> consuming lots of RAM. While I'm troubleshooting the problem, I need to set
> up a way to limit this process's RAM consumption, to something along the
> lines of 200MB.
> I was looking at using some of the RAM limiting parameters in
> /etc/login.conf. The three I found most relevant are memorylocked,
> memoryuse, and vmemoryuse. I'm not sure which one of these is the one I need
> to tweak. At this point I'm ready to set them all to 200MB. If someone can
> provide some info on which one of these I should actually be using (or point
> to somewhere that does) I'd appreciate it.
> And please, no flaming about how I should use an app that doesn't consume
> too much RAM. I'm working on that, but I need a short term solution to
> control this app's RAM consumption without bringing my whole system down.

See ulimit, in the manual for whatever shell you are using. It can be
used much more elegantly to set per-process limits.