[sugar] 9.1 Proposal: Performance

Erik Garrison erik at laptop.org
Wed Oct 22 14:28:23 EDT 2008


Proposal,

Implement the following hacks for a big performance boost from the
XO+Sugar user perspective.

Other systemic changes which could be made to improve system
performance from the user's perspective.

Discuss.

Erik


....
http://lists.laptop.org/pipermail/devel/2008-October/020404.html
....


In short, I have bundled a set of 'hacks' which generally (and in my
observation, dramatically) improve the user-perceived responsiveness of
the Sugar UI.  The hack bundle is available at
http://dev.laptop.org/~erik/faster-hacks.zip

I write requesting independent evaluation of the costs and benefits of
these modifications.

To test you *must* be running our current official release: 8.2-767.



-== Contents ==-

There are several 'hacks' included in this bundle:

 1) optionally disable frame appearance on activity switching, if the
file /home/olpc/no-frame-on-tabbing exists

 2) optionally disable autosaving on activity switching, if the file
/home/olpc/no-auto-save exists

 3) optionally start the X composite manager (xcompmgr) on sugar startup
to prevent the redraw of activity windows when switching from one
activity to the other (if /home/olpc/use-xcompmgr exists).

 4) compcache, http://code.google.com/p/compcache/, which makes a
compressed block device usable for swap out of a chunk of RAM.  By
compressing unused pages this system may offset memory usage increases
incurred by using composite.


-== Usage ==-

To install and test on an XO, open the Terminal activity and run:

    wget http://dev.laptop.org/~erik/faster-hacks.zip
    unzip faster-hacks.zip
    cd faster-hacks
    sudo ./install-faster-hacks

Restart Sugar, then, if you'd like to test with compcache, run:

    cd faster-hacks
    sudo ./start-compcache

Note also that you can adjust the amount of RAM (in kilobytes) devoted
to compcache by passing an argument to ./start-compcache, e.g.:

    sudo ./start-compcache 50000

By default it's set at 100000Kb (~100Mb).


You can enable hacks 1-3 while running Sugar by executing:

    ./enable-faster-hacks

and disable with:

    ./disable-faster-hacks

Effects will be immediately apparent.


The changes in Sugar source files and installed executable (xcompmgr)
can be reverted and removed with:

    sudo ./uninstall-faster-hacks

This step is a failsafe and likely unnecessary; ./disable-faster-hacks
should be sufficient to stop the effects and the size of the installed
programs is negligible (<30kb in xcompmgr).



-== Discussion ==-

Now continue to play with your XO as normal!  Please report experiences
and impressions.  The 4 hacks are independent in operation and may be
mixed and matched to achieve a variety of possible configurations.

Keep in mind that these hacks present a tradeoff between existing
features and UI responsiveness!

The disabling of the frame removes a feature, but this feature (frame
auto-appearance) may be unnecessary if we can rapidly switch between
activities, as xcompmgr enables us to do.

The disabling of autosaving removes a feature, but it drops the load on
the processor which we incur when navigating between activities, thus
improving switching performance.  

The use of xcompmgr represents a tradeoff between free RAM and system
responsiveness.  RAM is utilized to store offscreen framebuffers for
each window in the X server.  This obviates the need to have programs
redraw themselves when they are switched into, dropping CPU usage during
switching.

But part of the RAM hit we incur by running xcompmgr may be offset by
using compcache to provide a compressed swap partition-in-RAM.

Comments more than welcome!

Erik



More information about the Sugar mailing list