Oliver Welter wrote:
What means 'killed off'? Naively I assumed, that if e.g. current RSS
of the context is 52 MB and something (e.g. start of a Java
application) tries to get 42 MB, some pages must be 'kicked out' of
real memory to fullfill the 64 MB limit, resulting in bad performance,
but not 'killed'.
In this case it is likely that simply your new process wont start, you
get in real problems if you run into rss limit for an already running
process: A process P tells the kernel to reserve e.g 40 MB of RAM but
instantly only needs 20 MB, now you fill up the remaining 44 MB of
physikal RAM with other process. When now the R want's the already
reserved space there is nothing you can give him. Now eiter P terminates
because it cant allocate the mem it needs or the OOM Killer process
tries to sweep out processes from the RAM. It is very likely that it
will kill some currently idle processes that are essential for your
system....(I had this last week when OOM killed my mysql and silently my
sshd...)
Hmm ...
At the moment I try to consolidate a Webserver (real hardware) with 128
MB, Pentium 100, as a vserver into my HA-Cluster (2x 512 MB, 400 Mhz).
One of the reasons to choose vserver is, to give the admin of this
server root permissions within his context, and second to restrict the
resources. The current P100 server runs some bad wikis, using Java,
which is very greedy on memory. Thus the performance is bad because of
~80 MB swap used, slow disks.
My plan was, to give this context 20% CPU 'soft' (400 x 20% = 100 MHz),
128 MB RSS rlimit, and 500 MB VM rlimit. But if OOM can kill some vital
processes, this would need watching the services and restart them by
heartbeat.
Other possibility would be, to give this service more resources on the
secondary node of the cluster, and restrict (reconfigure) the rlimits in
case of failover to the primary node (where my preferred services are
running). Needs scripting and testing;-)
Helmut Wollmersdorfer
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver