Limit RAM usage



Hi,

I want to limit the amount of actual RAM usage processes can use. The /
etc/security/limits.conf (or the ulimit command) offer several memory
limits: data, stack, as and rss.

"data" and "stack" seem not to be comprehensive enough, processes can
still use much more RAM even than the sum of both. On the other hand,
limiting "as" is sometimes too strict, as processes might use more
virtual than real memory (I suppose e.g. when using file mapping). So
"rss" seems the right setting, but that simply has no effect, which is
consistent with the comment in the man page: "Ignored in Linux 2.4.30
and higher"

So how can I actually implement a limit on the real amount of RAM (on
a 2.6 kernel of course...)?

Cheers and thanks in advance,
Martin
.



Relevant Pages

  • Re: 32-bit programs on Windows x64
    ... KERNEL address space which can be in the paged pool (which is not the same as the pageable ... conceivably care about) and the amount which can be in the non-paged pool (the limit ... pageable memory is all that matters in terms of user performance, ... if there is 8.0 GB of RAM on the system? ...
    (microsoft.public.vc.mfc)
  • Re: running Linux with no swap space (but lots of RAM)
    ... Some amount of caching is necessary to achieve such I/O scheduling. ... The amount of memory allocated to ... Someone who thinks writing to /dev/null would result in lots of data being ... TB of RAM and fits in an ATX case using no more than 550 watts of power. ...
    (comp.os.linux.development.system)
  • Re: System Properties question: RAM
    ... I followed your instructions and the amount of physical memory available ... How do I see the BIOS and the RAM ... there's pretty much no point in installing more than 3. ...
    (microsoft.public.windowsxp.general)
  • Re: Does Vista Home Premimum Play Nice With 4GB Memory?
    ... 32-bit Vista does not know how to manage 4 GB memory, which is odd, ... aware having 4 GB RAM is OVERKILL for 99% of users. ... Changing from 1 GB to 2 GB there was some improvement, not a huge amount ... Going from 2 GB to 4GB using a 32 bit version of Vista ...
    (microsoft.public.windows.vista.general)
  • Re: Limit RAM usage
    ... I want to limit the amount of actual RAM usage processes can use. ... virtual than real memory. ...
    (comp.os.linux.misc)