The current and future state of CyanogenMod Nightlies

October 31st, 2011

CyanogenMod has had explosive growth over the past year.  When we started doing nightly builds, we only had to build for a few targets every night.  We now have over 50 targets to build for, and I get requests about once a week to bring up new devices on the BuildBot.  Many people wonder what they can do to help with this process, or ask how we are going to handle the new recommended build-system specs for Ice Cream Sandwich.

Background

We are currently using BuildBot to automate our nightly build process.  This entire process involves for each target:

  1. Checking out the entire Android source tree, this is accelerated by using a tarball that is generated daily before the nightly builds run.
  2. Compiling the target from a clean state.
  3. Uploading the completed build to a staging server.
  4. Syncing the completed build across the mirror network.
  5. Adding the build to the get.cm index.

All of our nodes in the BuildBot cluster can accomplish this in under 18 minutes.  However, the process usually takes a bit longer because the output of the build process is streamed to a central server and logged, which helps us identify build breaks.  The current average automated build time is about 40 minutes per target.  This can be greatly sped up by tweaking the process a bit, however it has not really been an issue thus far.

The ultra-nerdy, such as myself, will quickly realize that this works out to about 37 hours of wall time per day.  We are able to complete the builds in less than 24 hours because we balance them across four servers, generously donated by EugeneKay, jeagoss and phaseburn.

The Future

Ice Cream Sandwich is coming, and the question of how we are going to handle nightly builds constantly comes up.  Unfortunately source has not been released yet, so we can’t see how our existing hardware handles the considerably larger source tree.   Fortunately JBQ has shed a bit of light on this, with a post on the android-building mailing list.   JBQ is getting 25+ minute builds (wall time) on a pretty hefty dual-quad-core workstation with 24GB of RAM.  This configuration is significantly more powerful than our current setup.

We won’t really know what we need until source is released, though some optimizations can likely significantly improve the chances of actually being able to complete all of our builds in one day.

How can you help?

Every time someone mentions a lack of resources in our build cluster, we get tons of offers to use idle hardware to do builds.  This is great, and we’ve tried this before.  Unfortunately this did not work very well for many reasons.  The biggest reason was the hardware was not located in a datacenter, and there was no guarantee that it would be online and ready to start processing build requests.  Next, when an update to the software powering these automated builds had to go out, it was very difficult to coordinate with the hardware owners to make these updates (most of them did not want to hand over root access, as they were running on their desktops).

Keeping the above in mind, we are still willing to take hardware donations, though the requirements are pretty strict:

  • Minimum of 16GB of RAM.
  • Minimum of 8 physical cores (hyper-threading preferred).
  • Fast disks, SSDs are preferred, though SAS drives will do just fine.
  • Server must be located in a datacenter, not your home (some exceptions are made).
  • Minimum of 100Mbit Internet connection.
  • Full root access required.

The server(s) should ideally be dedicated to building CyanogenMod, however it is fine if they are not.  If you feel you meet the requirements above and would like to donate some servers, fire an email over to buildbot [at] ctso.me.  If you have hardware, but no home for it, feel free to reach out as well.  I’m sure we can work something out.

CyanogenMod 7.0.3 Released

May 6th, 2011

CyanogenMod 7.0.3 is now available for download. This update contains a bug fix for our update notification system, as well as an important security fix. It is recommended that all users running a version of CyanogenMod prior to 7.0.3 update to this release.  You should not install this update if you are already running a recent nightly build, only if you are coming from 7.0, 7.0.2, or 7.0.2.1.

As always, you can grab the latest version over at the mirror network, powered by TDRevolution. This update is also available on Rom Manager.

Please note that this release is still based on Android 2.3.3.  CyanogenMod 7.1 will include Android 2.3.4 features and updates.

CMStats – What it is, and why you should opt-in.

March 21st, 2011

CMStats has been included with CyanogenMod for quite some time.  Unfortunately, it has been hosted on Google App Engine and unable to keep up with the large number of requests it receives.   I recently reimplemented this in Pyramid and set it up to run on a server provided by TDRevolution.

So, what is CMStats?  On a fresh install of CyanogenMod you will get a notification asking you to opt-in to “CyanogenMod Statistics”.  A lot of people put a great deal of work into CyanogenMod, and with any project it is fulfilling to see the reach of your product.  CMStats enables us to do this by submitting some non-invasive information about each device that installs CyanogenMod (provided that you opt-in, of course).  While we could just track downloads, this does not give us an accurate number of the total number of unique devices on which CyanogenMod is actively installed.

When you opt-in, each time your phone boots a “checkin” is sent to our servers. On a side note, Google does the same thing, however theirs is mandatory. The data sent includes an non-reversible encrypted hash of your IMEI or MEID, allowing us to track unique devices without compromising privacy. In addition to this, we also track the device model (Nexus One, MT4G, Nexus S, etc), cellular carrier, country (reported via cellular carrier), as well as the version of CyanogenMod that is installed.

The most recent versions of the nightly builds have a new (and working) version of CMStats included. If you would like to help us test this functionality out, head over to the Mirror Network and download the latest nightly build for your device (build #28 and above include this). If you previously opted out, you can opt-in again by going to Settings -> CyanogenMod Settings -> System -> Anonymous statistics and checking the “Enable Reporting” checkbox.

Currently there isn’t a public interface to the actual statistics we collect, but I will be working on that over the next few days. As always, the code for these packages is opensource. On Github, CMStats is the application that runs on your device and CMStatsServer is the server side application. As always, contributions are welcome.

If you have any suggestions, feel free to send me a tweet @ChrisSoyars.