nuwa - process size reduction on b2g

Lloyd Hilaiel lhilaiel at mozilla.com
Wed Nov 13 08:23:05 PST 2013


Disclaimer: this is all hopeful future rumination, and changes nothing w.r.t to our initial strategy for landing FxA on FirefoxOS in the 1.3 timeframe. I feel like this is important work with important implications, so I’m detailing it here.

So I was able to see this magic, and it was inspiring.  Basically when Nuwa lands (target looks to be 1.3) we’re going to see 3x faster app startup and 66% memory usage.  This means a little tiny bare Firefox Accounts process would live in 6.3mb of USS and spawn in half a second.

https://bugzilla.mozilla.org/show_bug.cgi?id=930282#c9

I have two more ideas around this I’ll make on the b2g mailing lists.  Those are an idea to gain 10mb more of usable space before low memory killing occurs, and leveraging the existing features of the lowmemorykiller android driver to give us a means to allow apps an opportunity to shut down when we know memory pressure is pending.  less kill -9 a more graceful platform does make.

My hope, for mozilla, would be that these developments mean that we will move to a world where the benefits of process isolation and code encapsulation outweigh the constraints imposed by how gecko is currently employed on the device.  My further hope would be that encapsulation of code at the application level also lays the groundwork for incremental mozilla controlled update, and lets us be a lot more aggressive and nimble in developing apps that support cloud services in the future.

wistfully, hopefully, and optimistically,
lloyd

On Nov 8, 2013, at 3:59 PM, Lloyd Hilaiel <lhilaiel at mozilla.com> wrote:

> Alas, I cannot harness the magic here: https://bugzilla.mozilla.org/show_bug.cgi?id=930282#c5
> 
> lloyd
> 
> On Nov 8, 2013, at 3:14 AM, Jed Parsons <jparsons at mozilla.com> wrote:
> 
>> 
>> Lloyd brought this beautiful thing to my attention today:
>> 
>> https://bugzilla.mozilla.org/show_bug.cgi?id=771765#c34
>> 
>> In a nutshell, through some deep magic, it reduces the size of processes on b2g by a massive 4.5MB through the use of a separate shared-memory process.
>> 
>> And you can use it in your b2g builds now:
>> 
>> In your .userprofile:
>> 
>> export MOZ_NUWA_PROCESS=1
>> 
>> It may even ship in 1.3:
>> 
>> https://bugzilla.mozilla.org/show_bug.cgi?id=771765#c213
>> 
>> Wow.
>> _______________________________________________
>> Dev-fxacct mailing list
>> Dev-fxacct at mozilla.org
>> https://mail.mozilla.org/listinfo/dev-fxacct
> 
> _______________________________________________
> Dev-fxacct mailing list
> Dev-fxacct at mozilla.org
> https://mail.mozilla.org/listinfo/dev-fxacct




More information about the Dev-fxacct mailing list