<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Coop &#187; l10n</title>
	<atom:link href="http://coop.deadsquid.com/category/mozilla/l10n/feed/" rel="self" type="application/rss+xml" />
	<link>http://coop.deadsquid.com</link>
	<description>Five Different Types of Fried Cheese</description>
	<lastBuildDate>Tue, 20 Jul 2010 14:38:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Timely nightly updates for mozilla-central l10n</title>
		<link>http://coop.deadsquid.com/2010/03/timely-nightly-updates-for-mozilla-central-l10n/</link>
		<comments>http://coop.deadsquid.com/2010/03/timely-nightly-updates-for-mozilla-central-l10n/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 06:46:13 +0000</pubDate>
		<dc:creator>Coop</dc:creator>
				<category><![CDATA[Build/Release]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[l10n]]></category>

		<guid isPermaLink="false">http://coop.deadsquid.com/?p=1796</guid>
		<description><![CDATA[I landed a patch last week that represents the culmination of several months worth of effort by me, but that also brings to fruition the full promise of l10n nightly updates, work that was begun by Armen almost a year ago. History and motivation For almost as long as there has been a Firefox browser, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://addons.mozilla.org/en-US/firefox/addon/77707"><img src="/images/stockticker.jpg" width="100px" class="alignright" alt="stock ticker" title="stock ticker"/></a>I landed a patch last week that represents the culmination of <a href="/2009/09/consequences-of-l10n-nightly-updates/">several months worth of effort by me</a>, but that also brings to fruition the full promise of l10n nightly updates, <a href="http://armenzg.blogspot.com/2009/08/updates-nightly-just-en-us.html">work that was begun by Armen almost a year ago</a>.<br />
<span id="more-1796"></span></p>
<h4>History and motivation</h4>
<p>For almost as long as there has been a Firefox browser, there has been a nightly update channel whereby bleeding edge developers could keep their browser up-to-date with the latest code changes from the past day. For lay people, imagine the security update notices you receive every month or so, but happening on a daily basis.  There are changes made every day in the Mozilla codebase &mdash; bug fixes, new features, interface changes &mdash; so it&#8217;s important for us to have a vector to get these changes into testers&#8217; hands as quickly as possible. Since the people that use these &#8220;nightly&#8221; builds are often developers or involved community members, the likelihood of us getting feedback on any code changes introduced in these builds is relatively high. </p>
<p>To minimize the download size of each nightly update for our testers, we offer what we call a &#8220;partial&#8221; update, where we provide only the accumulated binary code differences between the new nightly build and the previous one. If testers are more than one nightly update behind, we offer them a &#8220;complete&#8221; update, which is essentially just an archive of the latest nightly build packaged in a format that can be understood by the browser&#8217;s updating framework.</p>
<p>The developers and community members who use these nightly builds and updates don&#8217;t necessarily live in the U.S. or speak English as their first language, however. Armen took the first huge step towards better serving these users last year when he added <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=480081">nightly update support for localized builds</a> (we call these builds l10n for short) on our core development branch, mozilla-central. For the first time ever, non-English users could get the same bleeding edge code as English speakers, but presented in their own language.</p>
<h4>Useful, but at what cost</h4>
<p>Mozilla has many different active code branches, all of which produce nightly builds for testing. Having proven its utility with the mozilla-central nightly builds, we wanted to extend the same l10n nightly update functionality to our other major branches, specifically the 1.9.2 and 1.9.1 code lines. However, after turning on <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=510524">nightly updates for the 1.9.2 branch</a>, we soon discovered a bottleneck in our update process.</p>
<p>Since we first began offering nightly updates, all of our nightly updates had been generated on a single linux machine (or more recently, a single Linux <abbr title="virtual machine">VM</abbr>). This was fine when there was only one locale to worry about, English (en-US). The update for each nightly build took between 2-3 minutes to generate, so even with 4 code branches (mozilla-central, 1.9.2, 1.9.1, CVS trunk) and 3 platforms (Linux, Mac OS X, Windows), updates would only ever take about 30 minutes to generate, total, and they would rarely be blocked because builds never finish at exactly the same time. Adding localized builds into the mix threw everything into disarray.</p>
<p>Mozilla prides itself on it&#8217;s localization story, but the sheer number of available localizations (around 75 per code branch) was swamping our poor, little update generation VM. As a rough estimate:</p>
<p><code>2.5 minutes/update x 3 update platforms x 75 locales<br />
= 562.5 minutes<br />
= >9 hours to generate all the nightly updates for one code branch</code></p>
<p>When we turned on the l10n nightly updates for the 1.9.2 branch, we had to make a number of changes immediately. </p>
<p>First, we certainly couldn&#8217;t consider turning on updates for another branch or nightly update generation would simply never catch up with itself. Because it would take over 18 hours to generate all the required updates for just two branches, we prioritized the English updates (en-US) so as not to degrade the existing nightly update experience for the consumers of English builds.</p>
<p>At this point, nightly updates for some locales were not timely <em>at all</em>, e.g. the Windows nightly build for the <a href="https://wiki.mozilla.org/L10n:Teams:zh-TW">Chinese Traditional, Taiwan (zh-TW) locale</a> would wait in the queue over 12 hours <em>every day</em> before having it&#8217;s partial update generated. In the timezones where a zh-TW localized build would most likely be used, this meant the base code of the &#8220;updated&#8221; build was always out-of-date by an entire day. </p>
<p>Adding a new platform, or even a new locale, was painful in a multiplicative rather than an additive way. Also, if we ever needed to re-spin a set of nightlies (which implies a new round of nightly updates), it meant that nightly update generation wouldn&#8217;t catch up for over 24 hours.</p>
<h4>Make it right</h4>
<p><a href="http://www.codesoftly.com/2010/01/home-improvement-as-inspiration.html"><img src="/images/holmes.jpg" width="100px" class="right" alt="Mike Holmes" title="Mike Holmes"/></a>Under these conditions, the decision to parallelize update generation was easy, the only question was how. We did consider simply adding more Linux VMs to generate updates, but that would have involved writing code to manage the pending update queue across multiple machines, or at the very least introducing an dedicated update generation machine per platform. The more straightforward solution would be to use the massive parallelization already provided by our existing build slave pool.</p>
<p>The first hurdle in generating our nightly updates on the build slaves was ensuring that the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=296303">MAR</a> (<b>M</b>ozilla <b>AR</b>chive) and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=296295">binary diff</a> tools worked on platforms other than Linux (which they now do) and were built automatically for branches on which we wanted to provide nightly updates (which they are now). There were also a bunch of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=535369">build system changes</a> that needed to happen to get MAR files uploaded automatically from the build slaves. After that, it was testing, lots and *lots* of testing. Last week, we finally got out of the testing phase and were able to deploy the changes for mozilla-central.</p>
<h4>The numbers</h4>
<p>There are always trade-offs when making a change like this, but honestly this is a pretty big win. Here are some typical l10n build scenarios from last week compared to the previous week before the updates-on-slave changes were in place:</p>
<table>
<tr>
<th valign="bottom">Platform</th>
<th>Last Build Finished (before)<br />PDT</th>
<th>Last Build Finished (now)<br />PDT</th>
<th>Added time/build<br />(m)</th>
<th>Update available (before)<br />PDT</th>
<th>Update available (now)<br />PDT</th>
</tr>
<tr class="odd">
<td>Linux</td>
<td align="center">03:44</td>
<td align="center">04:22</td>
<td align="center">1.5 &#8211; 5</td>
<td align="center">18:05</td>
<td align="center">04:18</td>
</tr>
<tr>
<td>Mac OS X</td>
<td align="center">06:10</td>
<td align="center">06:24</td>
<td align="center">2.5 &#8211; 4.5</td>
<td align="center">16:55</td>
<td align="center">06:24</td>
</tr>
<tr class="odd">
<td>Windows</td>
<td align="center">05:45</td>
<td align="center">06:58</td>
<td align="center">3 &#8211; 4</td>
<td align="center">19:50</td>
<td align="center">06:58</td>
</tr>
</table>
<p>In aggregate, we&#8217;ve added a <em>maximum</em> of 5 minutes/locale (often much less) x ~75 of locales, or 375 minutes, to the total time required to build all locales for a given branch on a given platform. Given 8 build slaves per platform assigned to create l10n nightly repacks, this means that the final l10n nightly repack on any build slave will finish roughly 45 minutes later than it did before the change. The parallelization of the overall process more than compensates though, at least as far as nightly updates are concerned. For example, the zh-TW localized Windows build may finish at 07:00 PDT now instead of 0615 PDT, but it&#8217;s nightly update is also <em>immediately available at 07:00 PDT</em>.  English (en-US) builds also have their updates generated on the slaves, but since their updates were prioritized before anyway, they continue to be timely.</p>
<p>The localized builds also need to build the binary diff tool (bsdiff), but we re-use the same checkout for the tools from one l10n build to the next, so we only ever have to incur that build cost once, in the absence of a clobber. Even when we do need to rebuild bsdiff, since we also re-use the existing configuration steps and make targets that have already been run earlier in the l10n build process, the maximum time we ever spend building the bsdiff tool is about 1 min.</p>
<h4>Onward</h4>
<p>Perhaps what&#8217;s most exciting about this change are the possibilities it opens up for us, and for others.</p>
<p>Nick is already busy extending this work to provide <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=534954">nightly updates for project branches</a>. Project branches are a relatively new thing in the Mozilla world, and soon the developers working on them will be able to stay current code-wise just the same as if they were working on mozilla-central. <a href="http://home.kairo.at/blog">KaiRo</a> also tells me that he&#8217;s only a few days away from having <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=555730">nightly partial updates available for SeaMonkey</a> for the first time ever!</p>
]]></content:encoded>
			<wfw:commentRss>http://coop.deadsquid.com/2010/03/timely-nightly-updates-for-mozilla-central-l10n/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Consequences of l10n nightly updates</title>
		<link>http://coop.deadsquid.com/2009/09/consequences-of-l10n-nightly-updates/</link>
		<comments>http://coop.deadsquid.com/2009/09/consequences-of-l10n-nightly-updates/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 01:56:13 +0000</pubDate>
		<dc:creator>Coop</dc:creator>
				<category><![CDATA[Build/Release]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[l10n]]></category>

		<guid isPermaLink="false">http://coop.deadsquid.com/?p=1541</guid>
		<description><![CDATA[The roll-out of nightly l10n updates has been&#8230;bumpy.﻿﻿﻿﻿ The primary user-visible symptom of this has been that nightly updates for en-US have sometimes been delayed by many hours when compared to when they would have been generated previously. I hesitate to say that these consequences were unforeseen, but rather that we were initially unsure how/if [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.destructoid.com/the-ten-most-meaningful-videogame-quotes-of-all-time-64837.phtml"><img src="http://bulk.destructoid.com/ul/64837-the-ten-most-meaningful-videogame-quotes-of-all-time/unforeseen-550x.jpg" alt="Unforeseen consequences" width="100px" class="alignright" /></a>The roll-out of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=449828">nightly l10n updates</a> has been&#8230;bumpy.﻿﻿﻿﻿ The primary user-visible symptom of this has been that nightly updates for en-US have sometimes been delayed by many hours when compared to when they would have been generated previously.</p>
<p>I hesitate to say that these consequences were unforeseen, but rather that we were initially unsure how/if the various systems we use to generate, store and serve updates would even cope when they had to deal with more than one locale.<br />
<span id="more-1541"></span><br />
We started by <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=502612">setting up a nightly update system in our release engineering staging environment</a>, something that was long overdue anyway. Unfortunately, while this allowed us to test the functionality of our code changes, it didn&#8217;t allow us to test at anywhere near the scale we run at in our production environment. The staging update server was easily able to keep up with the trickle of new builds and mars coming in from a small pool of staging slaves.</p>
<p>Of course, when we moved from staging to production, having a single virtual machine (VM) producing updates for all locales across all branches quickly proved to be a formidable bottleneck. We started by only generating nightly updates for en-US and all locales on mozilla-central. We then started generating and serving updates for the new 1.9.2 branch shortly after it was created. At that point, we had to pause and take a good hard look at the time it was taking our single update VM to generate all the partial updates we were expecting of it. </p>
<p>Instead of only 9 partial updates per day (3 active code branches x 3 platforms, en-US only), we were now expecting the system to generate >400 partial updates (2 code branches with l10n nightly updates enabled x 3 platforms x ~70 locales) per day. Each update takes between 1 and 2 minutes to generate, so in a worst-case scenario, it could take up to 14 hours to create all the partial updates. If we had added another branch at that point, we might well have had gotten into a cycle where we never caught up with pending updates!</p>
<p>The nightly update generation script/cronjob had a few flaws that quickly became evident under the new load. </p>
<p>First, the script processed all pending updates in a single go when kicked off via cron. All the new builds that have been created since the last attempt are synced to the VM and then update generation commences. Any new builds that are created while the current iteration of the script is running have to wait until the entire current batch is finished and the crontab entry fires again. </p>
<p>Second, there was no prioritization of builds within the update generation script. Generally, it was first-in-first-out (FIFO) but it also depended on the vagaries of how the internal hash was created. This meant that en-US updates no longer occurred immediately, but whenever they happened to enter the queue. This turned out to be especially bad for Windows, our most popular platform. </p>
<p>Due to the increased cycle time due to profile-guided optimization (PGO), nightly builds on Windows often finish after 7am PDT. Unfortunately, all our l10n nightly repacks were scheduled to start at 7am PDT. This caused a few unfortunate problems. Sometimes l10n nightly repacks would repack the Windows build from the previous day, since the current nightly was still in progress. New l10n builds from other platforms would also often enter the queue for nightly update generation before the new en-US builds for Windows were ready. Windows nightly updates sometimes did not get processed until late in the afternoon! This was a serious regression for nightly testers.</p>
<p>A couple of quick fixes were available. Armen added some code to the nightly update generation script to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=511901">sort the pending update graph so that any pending en-US updates in the current batch would always be processed first</a>. I also changed the way <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=469364">l10n nightly builds were being created so that they are triggered as soon as the corresponding base en-US nightly is finished building</a>. This allowed builds to enter the nightly update generation queue sooner (well, on Linux and Mac at least), but also fixed the longstanding problem on Windows of sometimes creating l10n repacks using the build from the previous day.  Together, these changes sped up the entire nightly update generation process by about 2 hours in aggregate. They also allowed us to get nightly updates for en-US on Windows out before noon PDT. This is acceptable in the interim, but not ideal.</p>
<p>The timing is fortuitous though, since I had already planned to tackle <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=410806">other</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=444050">aspects</a> of the nightly update generation system over the next few weeks. It is a natural extension of that work to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=511967">change nightly update generation from a cronjob happening on a single VM to build step that happens on the build slave at the end of each nightly build</a>. We already have this parallelism setup, so why not use it?</p>
<p>For any nightly testers out there, hopefully you can bear with us for a little while. We&#8217;ve greatly swelled your (potential) numbers by opening up nightly updates to the l10n community, but it will be a few more weeks until things are back to normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://coop.deadsquid.com/2009/09/consequences-of-l10n-nightly-updates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nightly updates for localized builds on mozilla-central</title>
		<link>http://coop.deadsquid.com/2009/08/nightly-updates-for-localized-builds-on-mozilla-central/</link>
		<comments>http://coop.deadsquid.com/2009/08/nightly-updates-for-localized-builds-on-mozilla-central/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 21:22:45 +0000</pubDate>
		<dc:creator>Coop</dc:creator>
				<category><![CDATA[Build/Release]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[l10n]]></category>

		<guid isPermaLink="false">http://coop.deadsquid.com/?p=1500</guid>
		<description><![CDATA[We&#8217;ve reached another milestone in our ongoing effort to elevate localized (l10n) builds to first class citizens within the Mozilla release engineering framework. Last week, Armen flipped the configuration switch to turn on nightly updates for l10n builds on mozilla-central. After a few downtime-related hiccups last week that tanked nightly builds across the board, this [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve reached another milestone in our <a href="/2009/06/lots-of-small-steps-add-up-to-big-changes/">ongoing effort to elevate localized (l10n) builds to first class citizens within the Mozilla release engineering framework</a>. </p>
<p>Last week, <a href="http://armenzg.blogspot.com/2009/08/updates-nightly-just-en-us.html">Armen flipped the configuration switch</a> to turn on nightly updates for l10n builds on mozilla-central. After a few downtime-related hiccups last week that tanked nightly builds across the board, this morning we were finally able to serve partial updates to l10n nightly users on all platforms.</p>
<p>This is another huge step forward. Nightly testers who use localized builds no longer have to download an entirely new localized browser every day, but can instead rely on the Firefox update service to automatically download a much smaller binary partial update for them. Aside from allowing us to make sure l10n nightly testers are always testing the most recent code and string changes, this may also allow us to recruit a new batch of nightly l10n testers who were previously worried about the bandwidth involved in helping us test on an ongoing basis.</p>
<p>Over the coming weeks we&#8217;re hoping to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=510524">enable l10n nightly updates on the newly-cut 1.92 branch</a> as well. We are dealing with many more builds passing through the staging server to the update generation machinery now, so there&#8217;s some housekeeping to be done first to make sure  that no builds, mars, or snippets are piling up in dark dusty corners anywhere.</p>
<p>Thanks to Armen for daring to touch the update code at all, to Nick for his update support, and to Axel for his tireless l10n work.</p>
]]></content:encoded>
			<wfw:commentRss>http://coop.deadsquid.com/2009/08/nightly-updates-for-localized-builds-on-mozilla-central/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Lots of small steps add up to big changes</title>
		<link>http://coop.deadsquid.com/2009/06/lots-of-small-steps-add-up-to-big-changes/</link>
		<comments>http://coop.deadsquid.com/2009/06/lots-of-small-steps-add-up-to-big-changes/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 16:11:05 +0000</pubDate>
		<dc:creator>Coop</dc:creator>
				<category><![CDATA[Build/Release]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[l10n]]></category>

		<guid isPermaLink="false">http://coop.deadsquid.com/?p=1420</guid>
		<description><![CDATA[What a difference a year makes. In fact, it was less than a year ago that Armen and John gave this presentation at the Summit in Whistler outlining the then-current problems with the l10n build system as it related to release engineering. Axel has a new post up about how we&#8217;ve been systematically addressing those [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/nitot/2721416274/"><img src="http://farm4.static.flickr.com/3158/2721416274_99ede61f3b_t.jpg" alt="Mozilla localizers at the Firefox'08 Summit in Whistler" title="Mozilla localizers at the Firefox'08 Summit in Whistler" class="alignright" width="100px" /></a>What a difference a year makes.</p>
<p>In fact, it was less than a year ago that <a href="http://armenzg.blogspot.com/">Armen</a> and <a href="http://oduinn.com/">John</a> gave <a href="http://armenzg.blogspot.com/2008/07/l10n-build-presentation-slides.html">this presentation</a> at the <a href="https://wiki.mozilla.org/Summit2008">Summit in Whistler</a> outlining the then-current problems with the <a href="http://en.wikipedia.org/wiki/Language_localisation">l10n</a> build system as it related to release engineering.</p>
<p><a href="http://blog.mozilla.com/axel/">Axel</a> has a new post up about <a href="http://blog.mozilla.com/axel/2009/06/05/got-l10n-builds/">how we&#8217;ve been systematically addressing those failings</a> over the last 10 months, and what we&#8217;re tackling next. </p>
<p>We&#8217;re all about lowering bars to entry into the Mozilla community. I&#8217;m thrilled to see our localized Firefox builds approaching parity with the default English (en-US) builds. Not requiring potential localizers to have a complete translation before they can get meaningful feedback, and greatly reducing the turnaround time for that feedback to a few minutes is huge. Taking the stress of generating those builds off of Axel&#8217;s shoulders is also a big deal, because it gives him more time to work on other improvements for the l10n community.</p>
<p>There is more work still to do, certainly, but we&#8217;re a lot better off than a year ago. Cheers to Aki, Armen, Axel, John, and Seth for their help in getting us this far.</p>
]]></content:encoded>
			<wfw:commentRss>http://coop.deadsquid.com/2009/06/lots-of-small-steps-add-up-to-big-changes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
