[sugar] perceived sugar performance
Benjamin M. Schwartz
bmschwar
Tue Apr 29 15:04:04 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eben Eliason wrote:
| On Tue, Apr 29, 2008 at 2:34 PM, Michael Stone <michael at laptop.org> wrote:
|> On Tue, Apr 29, 2008 at 02:15:54PM -0400, Paul Fox wrote:
|> > michael wrote:
|> > > Also, where does hibernation fit in your taxonomy?
|> >
|> > i'd think that's pretty different -- coming out of hibernation
|> > should leave the system exactly as it was when it went in.
|> > (unless i'm misunderstanding.)
|>
|> You understood correctly. It has been previously proposed that we should
|> (more or less) always hibernate. I was curious if you had thought about
|> the resulting system.
|
| Interesting. To clarify for myself, you're actually asking "what if a
| normal reboot was treated as though it were hibernation", such that
| the next time the laptop boots I find myself where I left off?" On
| one hand, this sounds like a fantastic idea. On the other hand, it
| could be that I rebooted specifically to get myself out of some bad
| state, in which case I might not want it to relaunch 5 activities
| which are going to bring the system to a crawl upon booting. (But
| maybe I misunderstood you...)
|
| Something that is certainly much more valid is to hibernate in the
| battery-dies case. In other words, if the battery reaches a
| critically low state and the computer needs to turn off, it should
| allow enough time to hibernate such that the full state can be
| recovered when a poer cable, or a new battery. That I am a strong
| advocate for.
I agree. To be clear, Michael is potentially referring to two different
things. The first, "true hibernation", uses kernel-level mechanisms to
write a copy of the RAM out to non-volatile storage before shutting down,
and reads it back after boot. This is potentially expensive in terms of
disk space. Also, given JFFS2's current read and write speeds,
hibernating might be slower than boot, though without compression it could
definitely be much faster than our current boot sequence. This "true
hibernation" brings the system back to precisely the same state at which
it was left off, with videos still running, and infinite loops still looping.
We have also discussed another concept, which I have called "fake
hibernation". In "fake hibernation", Sugar simply commands all Activities
to save their state, notes which activity instances were running, and
shuts down. On the next boot, it resumes those activity instances from
the datastore. This returns to the previous state only to the degree that
Activities save their state. For example, Browse would return to the same
address, but Terminal would load as a completely new instance. Fake
hibernation would not be any faster than conventional boot and shutdown,
but it would require essentially zero disk space.
I strongly prefer fake hibernation. I think it would be excellent to make
it the default in the case of low-battery shutoff, and perhaps in other
cases as well. However, we cannot speak very intelligently about it until
it has been implemented. The suggested implementation that I'm aware of is
to use Gnome's new session management system, which is just now
approaching usability. However, it has not been a priority, and requires
some significant knowledge of both session management and Sugar.
- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIF3EkUJT6e6HFtqQRAmj1AJ9hchEkc4jG0ZfzgFCX6eN/X9j18gCfa980
PIBfEDQdYnpjd7bs/tiHHIY=
=+9f2
-----END PGP SIGNATURE-----
More information about the Sugar-devel
mailing list