For the past month I've worked on achieving the effects of a reboot without actually doing one. Sort of a "virtual" reboot. This isn't a usual optimization; but in Mozilla's case it's likely to create a huge impact on performance.
Mozilla build/test infrastructure is complex. The jobs can be expensive and messy. So messy that, for a while now, machines have been rebooted after completing tasks to ensure that environments remain fresh.
This strategy works marvelously at preventing unnecessary failures; but wastes a lot of resources. In particular, with reboots taking something like two minutes to complete, and at around 100k jobs per day, a whopping 200,000 minutes of machine time. That's nearly five months -
yikes!
1Yesterday I began rolling out these "virtual" reboots for all of our Linux hosts, and it seems to be working well [edit: after a few rollbacks]. By next month I should also have it turned on for OSX and Windows machines.

What does a "virtual" reboot look like?For starters [pun intended], each job requires a good amount of setup and teardown, so, a sort of init system is necessary. To achieve this a utility called
runner has been created.
Runner is a project that manages starting tasks in a defined order. If tasks fail, the chain can be retried, or halted. Many tasks that once lived in /etc/init.d/ are now managed by runner including buildbot itself.

Among runner's tasks are various scripts for cleaning up temporary files, starting/restarting services, and also a utility called
cleanslate. Cleanslate resets a users running processes to a previously recorded state.
At boot, cleanslate takes a snapshot of all running processes, then, before each job it kills any processes (by name) which weren't running when the system was fresh. This particular utility is key to maintaining stability and may be extended in the future to enforce other kinds of system state as well.

The end result is this:
old work flowBoot + init -> Take Job -> Reboot (2-5 min)
new work flowBoot + Runner -> Take Job -> Shutdown Buildslave
(runner loops and restarts slave)
[1] What's more, this estimate does not take into account the fact that jobs run faster on a machine that's already "warmed up." http://linux-poetry.com/blog/section/mozilla/15/