Re: oom_killer crash linux system

Wu Fengguang
2010-10-18T15:31:23Z

On Mon, Oct 18, 2010 at 05:10:00PM +0800, KOSAKI Motohiro wrote:
> >
> > i want to test the oom-killer. My desktop (Dell optiplex 780, i686
> > kernel)have 2GB ram, i turn off the swap partition, and open a huge pdf
> > files and applications, and let the system eat huge ram.
> >
> > in 2.6.35, i can use ram up to 1.75GB,
> >
> > but in 2.6.36-rc8, i just use to 1.53GB ram , the system come very slow
> > and crashed after some minutes , the DiskIO is very busy. i see the
> > DiskIO read is up to 8MB/s, write just only 400KB/s, (see by conky).

There are much more reads than writes, it looks like some thrashing.
How do you measure the 1.75GB/1.53GB?

> > what change between 2.6.35 to 2.6.36-rc8? is it low performance about
> > page reclaim and page writeback in high press ram useage?
>
> very lots of change ;)
> can you please send us your crash log?

And there are several ways to help debug the problem.

- reduce the dirty limit

echo 5 > /proc/sys/vm/dirty_ratio

- enable vmscan trace

mount -t debugfs none /sys/kernel/debug
echo 1 > /sys/kernel/debug/tracing/events/vmscan/enable
<eat memory and wait for crash>
cat /sys/kernel/debug/tracing/trace > trace.log

- log vmstat events

i=1
while true;
do
cp /proc/vmstat vmstat.$i
let i=i+1
sleep 1
done

Thanks,
Fengguang