← Back to team overview

ubuntu-phone team mailing list archive

Re: ANN: Ubuntu Core/Touch Android 4.4 support & touch engineering platform/devices/hardware going forward

 

On Wed, Jan 15, 2014 at 8:18 PM, Jamie Strandboge <jamie@xxxxxxxxxxxxx> wrote:
> On 01/13/2014 08:40 AM, Alexander Sack wrote:
>> 1. Ubuntu Engineering (UE) will make a strong push on the _emulator_
>> during the month' ahead. Goal is to support the emulator for arm and
>> x86 as a _primary engineering platform_ for UE and our App Development
>> community. Once the emulator bits become available (stay tuned for
>> further announces) please take the time and start using the emulator
>> for everything you usually would do on the phone. We really want to
>> make the emulator a class A engineering platform for everyone and want
>> to hear about what works and what doesn't. Thanks!
>
> I think this is fantastic news and am very pleased on the progress of the
> emulator so far. I did want to point out that apparmor is still not enabled on
> the current emulator images though (they are in the upcoming ubuntu-emulator).
> Several things needed to happen to enable it, and that work is done. However,
> while getting it to work, we found that the performance of apparmor_parser on
> the arm emulator is abysmal, taking 16m 45s to compile 29 profiles. Of course,
> first boot on the arm emulator already takes a really long time, but adding 17
> minutes to that gave us pause.
>
> Steve Beattie, John Johansen and others from the team looked at this a bit and
> we now have very significant performance improvements in the parser and achieved
> ~60% improvement on the arm emulator (ie, from <17 minutes to < 6.5 minutes).
> The improvements will also be seen on real hardware too. In my testing on a mako
> system with 68 apparmor profiles, we had a 20% improvement (from ~75 seconds to
> ~60 seconds) when recompiling all policy. This is awesome work!
>
> While the parser performance has improved greatly on the arm emulator, once we
> enable apparmor on the emulator, there will still be a noticeable first boot
> slowdown[1]. You will be able to largely work around this though by booting
> once, shutting down, then updating your snapshot[2] (or with ubuntu-emulator:
> ubuntu-emulator snapshot --create=pristine <name>).

I think this is amazing. While the slowness of the armel emulator
might be seen as something that makes engineering hard, it is also
very good at seeing time and performance related issues much clearer
and by making the emulator experience flawless we contribute
significantly to our software quality and make Ubuntu Touch an even
stronger code base with much leaner and less wasteful resource
footprint.

So, if you haven't done so: try out the emulator for your use cases
too, just like jamie did here! Thanks!

>
> Couple of things to note:
>  1. we use cached compiled profiles so that after first boot we use just load
>     these off disk rather than recompiling, so typically the only time you see
>     the slowdown is when the kernel changes or you regenerate your image.
>  2. the x86 emulator should not be affected by this since apparmor_parser
>     performance has been fine under kvm (but it too will realize improvements
>     with the new patchset)
>
> [1] It is possible to eliminate this entirely by shipping the precompiled cache
>     files on the emulator. If someone wants to contact me off list, I'd be happy
>     to provide pointers and help out where I can if people are interested

I like the idea of improving first boot performance this way. Maybe
there are other things that could be precompiled during image build
rather than on-demand during or after first boot?

> [2] https://wiki.ubuntu.com/Touch/Emulator#Using_the_emulator
>
> --
> Jamie Strandboge                 http://www.ubuntu.com/
>
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>


References