low-memory testing

Jim Gettys jg at laptop.org
Tue Oct 30 12:53:16 EDT 2007


On Tue, 2007-10-30 at 14:01 +1100, James Cameron wrote:
> On Sun, Oct 28, 2007 at 11:23:13PM -0400, Albert Cahalan wrote:
> > Current OOM score: /proc/*/oom_score
> > Adjustment: /proc/*/oom_adj
> > 
> > Adjustments run from -17 (never kill) to 15.
> > 
> > Starting each activity with oom_adj=15 would
> > be a good start.
> 
> I've just tried something like that, and it worked nearly as well as I
> hoped.
> 
> Build 623, on B4.  Started a Sugar Console, hid it again, started
> Browse, then in an SSH session I set the Browse oom_adj to 15, left
> everything else as it was, and ran a fork-bomb consisting of a bash
> script that invokes itself.
> 
> http://dev.laptop.org/~quozl/2007-10-30-os-623-b4-oom-dmesg.txt
> 
> This shows the first to be killed was Browse, which was my intention.
> 
> It did take a fair while for it to happen though, during which the
> system was very unresponsive.
> 

Heh.  You'd expect that given the test; the system will start paging
madly and thrashing, as it increasingly steals text to the point that it
is spending all its time decompressing text, until ultimate OOMing the
browser.

A patch that would make all activities oom before any of the base system
or journal would be greatly appreciated, if someone has time.
                                - Jim

-- 
Jim Gettys
One Laptop Per Child





More information about the Devel mailing list