Re: VM Problems in 2.6.7 (Too active OOM Killer)
From: Andrew Morton
Date: Tue Jul 13 2004 - 23:19:39 EST
Peter Zaitsev <peter@xxxxxxxxx> wrote:
>
> The reason for me to disable swap both in 2.4 and 2.6 is - it really
> hurts performance. In some cases performance can be 2-3 times slower
> with swap file enabled. Using O_DIRECT and mlock() for buffers helps
> but not completely.
It's strange that swap should harm performance in this manner. Is that
also the case on 2.6?
wrt this OOM problem: it's possible that your ZONE_NORMAL got filled with
anonymous memory which the VM is unable to do anything about. If you're
going to run a highmem box swapless then you should tune the kernel so that
it doesn't use so much ZONE_NORMAL memory for anonymous pages.
Try
echo 500 > /proc/sys/vm/lower_zone_protection
then do:
echo m > /proc/sysrq-trigger; dmesg -c
You'll get output like this:
Normal free:407192kB min:936kB low:1872kB high:2808kB active:1572kB inactive:410348kB present:901120kB
protections[]: 0 468 128724
^^^^^^
This number here means that the VM will make 128724 pages (500MB) of the
normal zone ineligible for anonymous memory and pagecache allocations.
That is probably an appropriate setting for your application. If you set
lower_zone_protection too low you'll still get OOMs. If you set it too
high the file caching efficiency may suffer a little.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/