oom_adj

Lubos Lunak l.lunak at suse.cz
Tue Feb 17 14:40:13 GMT 2009


On Saturday 14 of February 2009, John Tapsell wrote:
> Hi all!
>
>  We could identify important processes (xorg, kwin, krunner) that we
> wouldn't want to be killed in a low memory situation, and adjust their
> oom_adj property.  This is used by the kernel out-of-memory handler
> when it tries to kill processes because the system is low on memory.
>
> Thoughts?

 We already had this in KDE3: The OOM-murderer in Linux sucks in a special way 
when it comes to KDE, since it selects processes that launch other processes. 
That means kdeinit, and, in KDE4's case when there are many session-restored 
apps, also ksmserver. That also means there's no point in protecting KWin or 
KRunner, since those should never accumulate high enough score unless they 
are really broken. It is a question if we should and can protect Xorg, since 
the kernel can't tell which X client is the one creating too many X resources 
and causing Xorg to use a lot of memory.

 As for kdeinit, we had protection in KDE3, see 
http://websvn.kde.org/branches/KDE/3.5/kdelibs/kinit/start_kdeinit.c?view=log#rev579164 , 
this commit and the following fixes could be ported to KDE4. At least I don't 
think that anything has changed since KDE3. Ksmserver could use something 
similar.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz




More information about the kde-core-devel mailing list