lkml.org 
[lkml]   [2009]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux scheduler capabilities for batch jobs.
Rik van Riel wrote:
> J Louis wrote:
>
>> If it was possible to tell
>> the scheduler that it was OK not to be fair when scheduling these
>> processes, I think the total runtime could be reduced if it put some
>> of the processes to sleep while others completed. Is there a way to
>> tell the scheduler it is allowed to do this? Should there be?
>
> There is no way to do this currently, but I suspect that it
> would not be too difficult to add.
>
> Of course, if you have two tasks that are each a little larger
> than memory, your idea could lead to one of the processes being
> starved forever. This is probably not acceptable :)
>
> In fact, one single batch process that is swapping could trigger
> the algorithm you described, halting itself. Your idea would
> need very carefuly implementation to avoid these kinds of issues,
> but I believe it could definately be done.
>
I think it gets doubly hard because the processes may have parts swapped even if
there isn't memory pressure, so you can't just use percentage in memory. If you
were going to do this in an effective way you would really need to monitor swap
rate per process, and factor in total size, so it's not trivial. Of course in
the extreme cases it would be hard to avoid improvement, so it need not be
perfect to be helpful.

--
Bill Davidsen <davidsen@tmr.com>
Even purely technical things can appear to be magic, if the documentation is
obscure enough. For example, PulseAudio is configured by dancing naked around a
fire at midnight, shaking a rattle with one hand and a LISP manual with the
other, while reciting the GNU manifesto in hexadecimal. The documentation fails
to note that you must circle the fire counter-clockwise in the southern
hemisphere.



\
 
 \ /
  Last update: 2009-06-03 23:17    [W:0.057 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site