You are not logged in.

#1 2008-09-28 19:54:31

mrbug
Member
Registered: 2007-07-17
Posts: 221

setting ram limits on individual programs/processes

Is it possible to set ram limits on individual programs/processes?

Specifically, can you limit the about of ram gunzip uses whenever it is run?


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#2 2008-09-28 21:55:31

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: setting ram limits on individual programs/processes

Yes; see man setrlimit and ulimit description in man bash. But your gunzip will die after encountering the limit - is it desired effect?

Offline

#3 2008-09-29 00:23:03

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: setting ram limits on individual programs/processes

That helps some, but the true desired effect is to do something similar to virtualizing memory -- I want to be able to say "process x is allowed to work within 512mb of memory," for example.

Thanks for the pointer on setrlimit... It does kill the process if it hits the hard limit? The man page sounds almost like it does what I want, but I guess not.

Last edited by mrbug (2008-09-29 00:25:57)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

Board footer

Powered by FluxBB