Subject: Re: [vserver] Question about rss limit and out-of-memory kill service
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Tue, 29 Jan 2008 13:25:39 +0100

On Mon, Jan 28, 2008 at 04:04:44PM -0800, Belinda Lawson wrote:
> On Jan 28, 2008 1:14 PM, Herbert Poetzl <herbert@13thfloor.at> wrote:
> 
> > On Mon, Jan 28, 2008 at 12:58:30PM -0800, Belinda Lawson wrote:
> >
> > Does anyone know if the vserver decides which processes get killed off
> > once
> > > the rss hard limit is reached?  And if so, what criteria does it use?
> >
> > the same decision process is used as on the host
> > (actually it is the host's OOM killer reaping the
> > processes), but you can provide a bias for each
> > guest (in recent kernels) and being over the soft
> > limit will increase the chances too
> 
> 
> From reading the documentation, I got the impression that nothing 
> would be killed until the hard limit was reached.  

well, assuming that the host is not overbooked, yes

> Is that incorrect then?

depends on the setup, if the host, for whatever reason
reaches a state where physical ram and swap doesn't
satisfy the overall memory requirements, then the OOM
kill will start reaping and it _will_ reap among the
guests too

as I wrote, you can adjust this behaviour with the usual
mechanisms (on the host) and a per guest bias for newer
kernels

> Is there a chance that the OOM killer will become active if I 
> am between the soft and hard limits?

see above, but if the sum of all hard limits and the
the host doesn't exceed the physical capacity, it is
very unlikely that the OOM killer will activate

HTC,
Herbert

> Thanks again,
> -Belinda