On Fri, Oct 28, 2005 at 07:14:20AM +0200, Lionel Elie Mamane wrote:
> On Wed, Oct 26, 2005 at 11:20:42AM +0200, Noam Meltzer wrote:
> 
> > 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.
> 
> You need to use "ulimit -d" and "ulimit -s".

That will only take care of the data segment and the stack. Trivially
worked-around by mmapping /dev/zero manually.

> > 'ulimit -v' (virtual memory) it can restrict the size of my
> > processes. (...) 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.
> 
> "ulimit -v" limits the address space of the process. The address space
> contains not only RAM page mappings (memory consumption), but also
> mapped files (at least the executable and the libraries, plus any file
> that is mmap'ed by the process). mmap is a special way to open files
> that has some limitations, but is much faster (and in some situations,
> can be easier to program with).

It's not faster to open the file, but it can be faster than seek +
read/write, although for most workloads, it's not.

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]

Reply via email to