On 09/15/2010 10:48 AM, Anish Mangal wrote: > Here's how it works. > > 0 < memory free < 100 > 0 < cpu free < 100 > > 0 < mem + cpu free <= 67 => unhappy > 67 < mem + cpu free <= 133 => serious/normal > 133 < mem + cpu free <= 200 => happy
I don't think this is a good enough heuristic. 1. CPU usage is not an indicator of impending failure. All programs should use 100% CPU when they are running, and 0% when they are idle. Metaphorically, your computer should be _happy_ when it's running, say, a fractal generator, because it's doing what it was built to do. Also, the kernel's scheduler ensures that one activity can't lock up the rest of the system. 2. I think we need a better heuristic for memory-happiness. On systems with large amounts of memory, 3/4 in use may still mean 1 GB free, so everything is perfectly fine. The reverse is true on small systems. My suggestion would be that the system is memory-unhappy if we estimate that there is not enough free memory to safely launch another activity. Once some activities are open, I think we can compute a good estimate for this very easily. A good heuristic should probably also contain a small adjustment to lower the unhappiness threshold on swapless systems. --Ben
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel