One of the largest tasks in MemoryReduction is going to be looking at how the Linux desktop handles its memory over long usage sessions. Developers often do the patch/compile/run/test cycle so quickly that they never notice their applications growing over time. Advanced users, when they are using a stable desktop, will just killall bloated-application. Evolution has even been so kind as to provide a shortcut, evolution --force-shutdown to allow users to stop the bloatage. In fact, this shortcut was used frequently enough that one user wanted a one letter command line option: ximianbug:46808.

This kind of memory handling may not affect advanced users who know what killall does; however, we can not expect the same of normal users. Applications must be able to keep their memory usage constant over long term sessions. As a community, we need tools that help us test this requirement.

The best way to do this is to get automated stress testing. We should be able to do a tool like this:

  • Set up an imap mail account and smtp server.
  • Replay the last year of 50 high traffic mailing lists to the account. Set the thing to create a new folder per mailing list per month.
  • Run Evolution
  • Look at every message that is in the mail box
  • On 1/10th of the messages, reply. Replies should be of various lengths. Some of them should be saved as a draft. Others should be discarded and sent to the trash. Maybe 1/30 should be sent.
  • On 1/50th of the messages forward them.
  • Move one out of 20 messages to a different folder.
  • "Print" one out of 100 (don't waste paper :-) )

Of course the ways of handling messages and the % of stuff that gets handled is just an example. Such a test would be automated. We could use the test in two ways:

  • The application can be run under valgrind. This is helpful for developers who need to know why the application grows.
  • The application can be run without valgrind, and we can use ps to test memory usage. This is good for a automated build type of setup: it can help developers see problems that arise during the development cycle.

Here are a few ideas of what could use this testing:

  • Evolution, as stated above. Need to test multiple types of email accounts, calendar, address book.
  • Nautilus (go around and look at every folder on the fs)
  • gconfd (this one should be fairly easy because we don't have to automate any GUI)
  • gnome-settings-daemon (need to test that settings can be changed without leaking memory, again gui-less)
  • gnome-panel (do various tasks such as switching desktops, playing with the clock, etc)
  • Firefox (spider, eg, cnn.com)
  • OOo (Open and close documents, write documents, etc)

As far as I know, no such tests really exist here. There may be some that I am not aware of; I'd appreciate pointers to any such test suites.

Initiatives/MemoryReduction/Tools/LongTermMemoryTests (last edited 2013-11-22 21:16:21 by WilliamJonMcCann)