[Dextrose] Stability stuff
Bernie Innocenti
bernie at codewiz.org
Thu Sep 2 04:36:36 EDT 2010
El Tue, 31-08-2010 a las 12:00 -0400, Martin Abente escribió:
> Hey guys,
>
> I have been testing our last dextrose build for the XO 1, and comparing it
> to the previous os179py (Sugar 0.84) version. I have noticed that the
> kernel included in the os179os provides a mechanism for killing activities
> when the laptop runs out of memory.
This is the kernel out-of-memory killer. It's been in the Linux kernel
since 2.4.x, so all versions of the XO software include it.
The OOM killer makes its guess using heuristics. Sometimes, it could
kill the wrong process, leaving the machine in an unusable state.
Killing processes should be seen as a last-resort action, to recover
from a situation that should never happen. Unfortunately, Sugar does not
have any mechanism to gracefully quit activities when memory is tight.
Technically, this is not a bug in Sugar or in Dextrose. OOM killing is
the normal behavior of Linux even on servers. It's just that it's too
easy to trigger on the XO.
If you grep the OLPC and Sugar development mailing lists, you'll find
many threads in which this topic was discussed and solutions were
proposed. One such threads happened recently in conjunction with the
discussion of Anish's CPU & Memory meter.
I liked the solution that was proposed last: when memory gets tight,
Sugar simply asks the least recently used activity to quit (and thus
save to the journal). Optionally, we could put on a notification to let
the user know what happened (after the fact).
> I have tried to trigger this mechanism on our last dextrose build, but
> with no results. Is it possible that our last kernel does not include this
> mechanism? And in that case is there any reason for not including it?
No, all kernels include it. There are a bunch of tunables
in /proc/sys/vm to make the oom killer behave differently. The most
important one is "swappiness", which seems to be set a little bit too
high on the current OLPC kernels (all of them, not just Dextrose).
Note that we're using the very same kernel that OLPC uses on os852, so
bugs should be shared.
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Dextrose
mailing list