[Nottingham] Opportunistically maximising resource utilisation

Michael Simms michael at linuxgamepublishing.com
Tue Sep 23 14:09:24 UTC 2008


Im not sure what the problem with nice -19 is, at least for CPU. It will
be able to use as much spare CPU as the processor has avaialable and
then will be the first thing put to wait when things get crowded. Thats
how all of the distributed computing clients seem to work.

As for memory, its fairly easy to find how much available memory there
is on a system either with a system call or with shelling out and
parsing the result of free, depending on the language you are using.

On Tue, 2008-09-23 at 10:03 +0100, Martin wrote:
> So...
> 
> What might be the best strategy for an unprivileged low priority
> application to sense and opportunistically utilise spare resource such
> as idle CPU time and spare RAM and yet avoid (causing) excessive memory
> swaps or a system slow-down in any way?
> 
> That is, how can you make a big resource hog really really nice and
> unobtrusive for whatever system?
> 
> And also have the task gracefully kill itself if it has exceeded a
> certain CPU time or clock time without completion?
> 
> 
> For example, I'm wanting something better than just looking at 'load
> average' because you can have a "high load" whilst the CPU is still 99%
> idle... And "nice 19" doesn't let a process tune itself for present
> conditions.
> 
> (A more 'holistic' view?)
> 
> 
> Ideas?
> 
> Cheers,
> Martin
> 
-- 
Michael Simms - CEO Linux Game Publishing LTD
http://www.linuxgamepublishing.com



More information about the Nottingham mailing list