On Wed, Oct 26, 2005 at 11:20:42AM +0200, Noam Meltzer wrote: > Hi, > I'm trying to set a size limit over processes for some system. > I tried setting 'ulimit -m' (memory size limit), but it had no effect. > After playing around with ulimit (at the end, i will put the > configuration in /etc/security/limits.conf) I found that when I > change: 'ulimit -v' (virtual memory) it can restrict the size of my > processes. But the problem is that I can't find a direct relation > between the size I set in the 'ulimit -v' command and the actual size > i'm allowed to allocate. > Can anyone explain or direct me to information of what is this > relation between the two parameters?
-v - virtual memory size - maximum size of memory the process could theoretically use. -m - rss size - maximum size of the resident set - how much *physical* memory the process could use at any given point in time. Both are counted in pages. With regards to -m and its apparent non-usefullness, setrlimit(2) has this to say: RLIMIT_RSS Specifies the limit (in pages) of the process's resident set (the number of virtual pages resident in RAM). This limit only has effect in Linux 2.4 onwatrds, and there only affects calls to madvise() specifying MADVISE_WILLNEED. If you really need this, I suggest you take a look at the overcommit patch and the various beancounting patches. Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]