MaverickCDBuildSpeed

Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2010-05-18 14:07:59
Size: 3234
Editor: 82-69-40-219
Comment:
Revision 5 as of 2010-09-29 18:28:59
Size: 2943
Editor: robbie.w
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * '''Launchpad Entry''': UbuntuSpec:foundations-m-cd-build-speed  * '''Launchpad Entry''': UbuntuSpec:foundations-n-cd-build-speed
Line 22: Line 22:
You can have subsections that better describe specific parts of the issue. === Primary work ===
Line 24: Line 24:
== Implementation == To permit future measurements, we will change `livecd-rootfs` to log the total time taken for live filesystem builds, as well as any other intermediate timings which may be useful.
Line 26: Line 26:
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like: Building on a tmpfs speeds up live filesystem builds substantially (down to 7 minutes on amd64, down from 21 minutes to 16 minutes on i386). This is only practical for non-DVD builds, but we will do it for other builds.
Line 28: Line 28:
=== Code Changes === Early stages of live filesystem builds are common to multiple flavours, particularly the base system `debootstrap` and the desktop element of DVD builds. We will profile the results of rsyncing this to a safe location along with an archive timestamp, and simply copying it back rather than rebuilding it if the archive timestamp hasn't changed. If profiling suggests that this is beneficial then we will do it. (Cody Somerville says that saving the results of `debootstrap` is a net gain for `live-helper`.)
Line 30: Line 30:
Code changes should include an overview of what needs to change, and in some cases even the specific details. Cody Somerville says that some degree of parallelisation speeds up live filesystem builds for OEM Services. We will investigate whether this is also true for `livecd-rootfs`, and if so what maximum degree of parallelisation we can allow.

We will add a facility to remove the `/usr/share/doc` report and the `fdupes` run from release builds.

We will add a dpkg option to turn off I/O safety (fsync et al) and use that during live filesystem builds.

=== Secondary work ===

We will evaluate `live-helper` as a replacement for `livecd-rootfs`. In order to commit to this, we would at minimum need to do a file-by-file comparison of the output and sign off on any differences; a moderate amount of customisation work will almost certainly be required.
Line 38: Line 46:
== Unresolved issues ==

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

== BoF agenda and discussion ==

{{{
Lucid: big `apt-get install` phase in livecd-rootfs: 23min amd64, 9min i386

Total with tmpfs (Ubuntu): amd64 7min, i386 21min -> 16min

dpkg fsync->sync fix helps substantially (as elsewhere!)
 * will also investigate turning off syncing entirely

Cody says that concurrent builds helped them a lot

== Work items ==

 * Log total time for livefs builds [lamont]
 * rsync tree to a safe location following debootstrap, and following non-DVD builds; copy this back as the starting point when necessary, but only if the corresponding archive timestamp is correct [lamont]
  * Requires profiling to determine whether this is actually a win; Cody says this is a win in live-helper for at least the debootstrap stage
  * Union mounts may speed things up further - but probably not for maverick
 * Investigate effects on parallelisation of livefs builds [lamont]
  * (ISO builds are already parallelisable, but we generally don't since our bottlenecks are in livefs builds)
 * Investigate removing /usr/share/doc report and fdupes run from release builds [lamont]
 * Add and use dpkg option to turn off syncing entirely [cjwatson]

== Future (we can start investigating this any time) ==

 * Evaluate live-helper as a replacement for livecd-rootfs [cjwatson]
  * Would want to do file-by-file comparison of output and sign off on any differences
}}}

Summary

CD build speed has been creeping back up of late; attack it again.

Release Note

Not a user-visible feature, so no release note required.

Rationale

CD build times are a bottleneck in the release process. We have worked on this before, but we build many more images now and the problem has once again become acute. At the moment, live filesystem build times seem to be the worst offenders.

Design

Primary work

To permit future measurements, we will change livecd-rootfs to log the total time taken for live filesystem builds, as well as any other intermediate timings which may be useful.

Building on a tmpfs speeds up live filesystem builds substantially (down to 7 minutes on amd64, down from 21 minutes to 16 minutes on i386). This is only practical for non-DVD builds, but we will do it for other builds.

Early stages of live filesystem builds are common to multiple flavours, particularly the base system debootstrap and the desktop element of DVD builds. We will profile the results of rsyncing this to a safe location along with an archive timestamp, and simply copying it back rather than rebuilding it if the archive timestamp hasn't changed. If profiling suggests that this is beneficial then we will do it. (Cody Somerville says that saving the results of debootstrap is a net gain for live-helper.)

Cody Somerville says that some degree of parallelisation speeds up live filesystem builds for OEM Services. We will investigate whether this is also true for livecd-rootfs, and if so what maximum degree of parallelisation we can allow.

We will add a facility to remove the /usr/share/doc report and the fdupes run from release builds.

We will add a dpkg option to turn off I/O safety (fsync et al) and use that during live filesystem builds.

Secondary work

We will evaluate live-helper as a replacement for livecd-rootfs. In order to commit to this, we would at minimum need to do a file-by-file comparison of the output and sign off on any differences; a moderate amount of customisation work will almost certainly be required.

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage.

This need not be added or completed until the specification is nearing beta.


CategorySpec

FoundationsTeam/Specs/MaverickCDBuildSpeed (last edited 2010-09-29 18:28:59 by robbie.w)