Re: ulimit -m

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

 



On Fri, 12 Jul 2002, Zou Min wrote:
> On Thu, Jul 11, 2002 at 09:35:52PM -0300, Rik van Riel wrote:
> > I've implemented RSS limits in the -rmap VM.
> >
> > Note, however, that excess RSS of processes is _not_ swapped
> > out if there is enough memory available...
>
> I am sorry I am not very clear here.
> Say if there are 400MB free memory space, and I try to limit RSS of a process
> started by bash to 4000KB by doing "ulimit -Hm 4000", then after the process
> is fired up, would its RSS value possibly exceed 4000KB?

Yes. The RSS limit is only enforced when the system is low on
memory, by:

1) swapping out any page that is over the RSS limit
2) slowing down pagefaults of a process over its RSS
   limit when the system is low on memory

> I still couldn't impose the RSS limit, when there is enough memory available.

That's the idea. When the system has enough free memory enforcing
an RSS limit just takes away disk bandwidth from the other processes
in the system.

I've tried this once (in the 2.1 days) and system performance was
_very_ bad with half of RAM free and one RSS-limited program using
all disk bandwidth for swapping.

Things were much better when that RSS-limited program was just
sitting in RAM until the memory was needed and letting the rest
of the system use the disk at a good speed.

regards,

Rik
-- 
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/		http://distro.conectiva.com/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux