← 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 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>).

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
[2] https://wiki.ubuntu.com/Touch/Emulator#Using_the_emulator

Jamie Strandboge                 http://www.ubuntu.com/

Attachment: signature.asc
Description: OpenPGP digital signature

Follow ups