[Sugar-devel] #2141 UNSP: Memory and CPU status indicator for the frame.

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Wed Sep 15 11:36:20 EDT 2010

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

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100915/8f47b663/attachment.pgp 

More information about the Sugar-devel mailing list