Experimenting with build times

I got a new Windows desktop last week, and was curious if enabling disk compression would have any effect on build times… The theory being that source code compresses well (binaries too, to a lesser degree), so less disk IO should result. The price is more CPU usage, but this is a Core i7 box, so that’s basically free.

Result: Theory Busted.

Without disk compression, a full build took 23 minutes. With disk compression, 24 minutes. [Drive formatted between tests.] I’d guess some combination of not being IO bound plus disk seeks dominate, so compression doesn’t really help and just adds overhead. I also tried disabling “write-cache buffer flushing” to no effect, although I’m curious if splitting my build across two drives will help at all [src on one, objdir on the other; currently it’s in a RAID-0 config].

One thing that would be nice is if parallel make worked correctly with Mozilla on Windows. If I build with anything higher than MOZ_MAKE_FLAGS=”-j1″, the build hangs at random (?) places. Seeing as this is a quad-core box (8-core, if you count HT), that makes me all sad and frowny.

Update: Mitch on IRC pointed out bsmedberg’s pymake work. With -j1 it’s about 30 seconds slower, but with -j10 it did a full build in 11 minutes (without hanging like a gmake build did!). Yay! I should also note that until now I’ve been doing Windows builds in a VM, which can take well over an hour to finish.

About Justin Dolske

Mostly harmless.
This entry was posted in Firefox, PlanetMozilla. Bookmark the permalink.

4 Responses to Experimenting with build times

  1. Ed Avis says:

    A feature I’ve always wanted in make is a –random flag that would randomize the build order (while still respecting dependencies). That would help to flush out the kind of makefile bugs that stop parallel builds from working.

  2. tmielczarek says:

    I don’t think the parallel build problems are problems in our build system, I think there’s a bug in gmake or msys somewhere that makes it hang on Windows Vista/7. The fact that pymake works fine at -j10 seems to prove that. (Also people have been building Mozilla with huge -j values on Linux for quite some time.)

    We’ll have to get those last two patches in and make it real easy for people to use pymake, given the parallel build problems on Windows.

  3. Chris AtLee says:

    Any ideas on how long a PGO build takes?

  4. RyanVM says:

    Good to know about pymake. I’ve had to stop doing -j builds for awhile now due to the hanging issues on Vista.

Comments are closed.