Conserving Memory on the OLPC XO-1

One of the things I noticed right away when I started installing alternative operating systems on my OLPC XO-1 is that not all combinations of OS and software ran equally well. In fact, some configurations ran so slowly that it was almost unbearable to use as a normal environment.  To be fair, this is par for the course on all netbook systems – not just the XO-1 – with their slower CPU speeds and reduced memory.

On the XO-1, fortunately there are tweaks you can do to improve both things. You can overclock your machine to improve the CPU speed a bit, something I might cover later.  I also found that there was an almost direct correlation between how speedy my machine felt and the amount of available memory.

So with that in mind, about a year ago I did a series of experiments to see the impact of different OS’es, window managers, and swap file configuration had on available memory.

Here’s a table summary of the amount of available memory after booting up and entering “free” in an X-based terminal program.  In all scenarios, X was up and running, as was the Windows Manager and the wireless networking stack (connected to my wireless router).

Scenario Free Memory
A. Fedora 8.2 + Sugar 58,880
B. Fedora 8.2 + Fluxbox 115,936
C. Ubuntu 8.1 + XFCE 57,884
D. DebXO 0.4 + Gnome 80,080
E. DebXO 0.4 + Gnome + simpler wallpaper 84,616
F. DebXO 0.5 + Gnome + simpler wallpaper + SD swap 77,396
G. DebXO 0.5 + Gnome + no wallpaper + SD swap 82,152

Operating systems: “Fedora 8.2” refers to the operating system that came with the OLPC; updated versions are available for download.  “Ubuntu 8.1” refers to an amazing effort from Teapot that lets you install Ubuntu on your XO-1.  “DebXO” refers to a version of Debian that, thanks to Andres Saloman, you can also install on your XO-1.  (For completeness, I should mention that there are now at least two other interesting and promising Linux distributions that you can try out – Fedora 11 and TinyCore Linux.  However, these weren’t available when I did these experiments.)

Windows managers:  Sugar of course refers to the default, kid-friendly operating system that comes with the OLPC software.  Fluxbox and XFCE are two very popular lightweight desktop managers.  Finally, Gnome is one of two full fledged desktop environments normally associated with grown-up Linux desktops; KDE would be the other one, but I didn’t try that.

Wallpaper:  Yup, believe it or not, I wanted to see the impact of changing the desktop wallpaper between large bitmap pictures, simpler SVG-based pictures, and no wallpaper at all.

SD swap: Because I wanted multitasking, it was important for me to also see the effects of having a swap partition created on the SD card.  This would give me greater virtual memory, so that once physical memory runs low, the OLPC could swap background memory to the SD card so I could still run additional applications.

Okay, so perhaps not the most scientific or comprehensive set of results (if I had more time, I would have tried some other combinations), but I think it is fair to draw some interesting observations:

  • The memory overhead of Sugar is significant.  Looking at the difference between scenarios A and B above, I had to retest a couple of times to verify the numbers were still in the range.  Sure enough, if I do nothing but boot up into Fluxbox instead of Sugar, I get a significant boost in memory!
  • Gnome is more expensive than Fluxbox or XFCE, but not too much.  I admit to liking the full functionality and ease-of-use afforded by Gnome, so I was happy to see that while it definitely takes up more memory than Fluxbox or XFCE, that it wasn’t too bad.  If you want the absolute leanest system, though, changing the windows manager definitely had the biggest impact!  I would go with Fluxbox or even some of the lighter managers if I wanted the absolute most free memory.
  • The wallpaper makes a difference!  Okay, maybe it’s worth it to have a picture of leaves in your background, but for me, it was a no brainer to just turn that off to get the extra boost.
  • Setting up the swap partition also takes up memory.  Here’s where you have to make a call – if you are happy running single programs at a time, and/or don’t need to run any large programs (like Open Office), then you can skip the swap partition and be in good shape.  For me, I wanted to be able to have multiple browser pages open and be writing at the same time, so it was worth the cost.  I’ll just turn off my wallpaper.  🙂

As I said, not the most scientific way to do this, but what I learned above definitely helped me pick and tweak the software that ended up on my XO-1, and worked for what I needed it to do.

Leave a Reply

Your email address will not be published. Required fields are marked *