SlideShare uma empresa Scribd logo
1 de 46
Accelerating Android Development
David Rosen, Product Manager
drosen@electric-cloud.com
@adr0sen
Design West 2013
What’s this Android buzz all about?
2
Qualcomm Reference Design Program
<60 days TTM, and pushing for faster
Source: http://www.qualcomm.com/connect/analyst-relations/events/americas-analyst-summit-2012
Android Development Landscape
Real-world challenges at large APAC mobile device maker
Automotive
6%
Mobile
38%
Consumer
electronics
18%
Industrial
control and
automation
6%
Medical
4%
Military/aero
space
3%
Other
25%
Users of Android by Vertical
Electric Cloud Android/Embedded Survey (Q1 2013)
• Survey
• Focused on Android
development & delivery
• Global embedded contacts in
Electric Cloud marketing lists
• 350+ respondents
• 175+ Android
Android Delivery Process Today
Technical Challenges
• Slow Android Builds
• Slow, Complex CTS
Testing
• Complex B-T-R Matrix
• Custom Testing –
Volume, Complexity
Negative Business Impacts
• Slow Time to Market
• Poor Quality of products
• Poor productivity of
teams
Less than 1
hour, 22.5%
1-4
hours, 57.5
%
4-8
hours, 15.0
%
More than 8
hours, 5.0%
Avg. time to execute CTS
Less than 5
minutes, 7.8
%
5-20
minutes, 21.
0%
20 minutes -
1
hour, 28.8%
1-4
hours, 27.0
%
More than 4
hours, 15.3
%
Avg. release build time
Agenda
• Accelerating the Android Build
• Accelerating the Android CTS execution
• Accelerating the end-to-end Android Development Lifecycle
Accelerating the
Android build
Why look at Android builds?
• Android is everywhere
• 68% of global mobile phone market share1
• Explosion of non-phone applications
• Automotive (Saab, Renault)
• Entertainment (Ouya, Nvidia)
• Exercise equipment (NordicTrack)
• Rice cookers! (Panasonic)
• Android is everywhere
• … and that means thousands of developers building Android
• What if we can make those builds faster?
• How would your development process change?
• How much more could you achieve?
1 Source: Gartner, February 2013
What is (and is not) covered in this part of the talk?
• Build acceleration techniques fall into two broad categories:
• Hardware improvements like faster CPU’s and better disks
• Software improvements like smarter build tools and faster compilers
• In general, hardware and software improvements are complimentary
• If you want the fastest possible builds, leverage both!
• This talk is about software techniques for build acceleration
• Given a fixed hardware platform, how fast can we build Android?
• Or, what do you do when you reach the limits of your hardware?
0
2,000,000
4,000,000
6,000,000
8,000,000
10,000,000
12,000,000
14,000,000
16,000,000
18,000,000
Linux Kernel
Android
Mozilla Firefox
Chromium
Webkit
AOSP LOC Evolution
Jan 2009 – Jan 20131
1 Source: http://www.ohloh.net, http://en.wikipedia.org/wiki/Android_version_history (February 2013)
+15%
+123%
+19%
+2%
+30%
+12%
+17% +2%
0
2
4
6
8
10
12
14
16
18
00:00
00:14
00:28
00:43
00:57
01:12
01:26
01:40
2.2 2.3.4 4.0.1 4.1.1 4.2.2
Millions
Build Time
LOC
AOSP Build Evolution
Android Version Release Date LOC1 LOC
Growth %
GNU Make
Build Time2
Build Time
Growth %
2.2 May 2010 8,837,858 - 28m55s -
2.3.4 April 2011 11,492,324 30% 33m10s 15%
4.0.1 October 2011 12,827,330 12% 1h13m54s 123%
4.1.1 July 2012 15,028,331 17% 1h28m11s 19%
4.2.2 February 2013 15,266,8033 2% 1h32m56s 2%
1 http://www.ohloh.net, 2 Builds performed on 8-core 16GB RAM server, 3 LOC data as of December 2012
Common wisdom about Android builds
• I can just…
• … add more cores
• … use distcc
• … use ccache
• “The Android build is as optimized as it can be!”
The common wisdom is wrong.
Sidebar: how much faster is “interesting”?
• Some large mobile device makers run > 50K builds/week
• At 15 minutes per build that’s 12,500 hours of build time
• A reduction of just one minute would save 800 hours every week
• What about wait time?
• Faster builds = more iterations
• Faster builds = higher quality
• Faster builds = lower time to market
How fast is GNU make?
• Best time: ~15m
• 48-cores
• 128GB RAM
• No ccache
Problem: Visibility
• Knowing the end-to-end time is great but not actionable
• We need visibility
• Where is the time going?
• What are the bottlenecks?
• Are there opportunities for improvement?
• How do we get that visibility?
• Instrument the build… somehow! strace, echo, hack gmake, or…
• ElectricInsight
• Visualization and analysis of builds run with ElectricMake
• Let’s pump this build through emake and see how it looks!
Solution: ElectricInsight
What can we see from here?
• An ideal build would look like a tightly packed box
• Overall looks almost perfect – well done, Android team!
• But! a couple of things stand out:
• Crazy long parse time1
• Gaps at the end of the build, indicative of serializations
• We’ll look at both of these, but first: what if we just use more
cores?
1 emake parsing may be slower than gmake parsing
Longest serial chain
• Best possible runtime is about 15m
Best possible is about 15m
Projected runtime with more cores
What else can we learn?
• Lots of non-compile work in the build - ~25% of total time
Problem: long parse time
• Why do we build?
• To transform sources into deliverables (programs, docs, etc).
• Does parsing makefiles transform sources into
deliverables?
• Nope.
• Parsing makefiles is pure overhead
• But you have to tell make what to do somehow
• Unless you want to manually invoke the compiler, linker, etc.
Solution: parse avoidance
• What if we don’t parse (every time)?
• Makefiles don’t change very often, so why reparse every time?
• Reuse parse results from a previous build, as long as…
• Makefiles are unchanged (MD5)
• Command-line is unchanged
• Environment is unchanged
• How do we do it?
• Electric Make already has parse results in a reloadable form, just
need to add cache management
• GNU make doesn’t, but could be modified
Parse avoidance impact
Build time reduced to about 13m30s
Problem: serializations
• Gaps in visualization suggest serializations
• Q: How many dependencies are there in the
Android build?
• A: More than you think!
Android Dependency Graph
• Dump all makefile rules
• 100,000 files/targets
• 1,990,628 dependencies
Dependencies in Android
• ~19 dependencies per file: why so many?
• Consider a typical build structure:
• Some files will have many dependencies
• Most have only a few
• What is going on in Android?
lib.a: foo.o bar.o
foo.o: foo.c foo.h util.h
bar.o: bar.c bar.h util.h
Superfluous dependencies in Android
• Do we really need all 1.9M dependencies?
• The filesystem can tell us!
• Collect a list of files actually used to generate a target
• Compare to the list of prerequisites specified in the makefile
• Example:
• Why not run foo.txt and bar.txt in parallel?
foo.txt:
echo “Hello” > foo.txt
bar.txt: foo.txt
echo “World” > bar.txt
Actual dependencies in Android
• 100,000 files/targets
• 288,804 dependencies
Specified vs. Actual dependencies in Android
Specified Actual
Solution: dependency optimization
• Impossible to manually eliminate superfluous
dependencies
• Electric Make can prune them automatically
• If you use gmake, you can achieve the same effect:
• Remove existing dependency specifications
• Generate minimal dependency specifications from emake data
• Before:
• After:
$(OBJECTS): %.o: %.cpp $(ALL_HEADERS) $(OTHER_DEPS)
$(COMPILE.CC)
$(OBJECTS): %.o: %.cpp
$(COMPILE.CC)
foo.o: foo.h util.h
bar.o: bar.h util.h generated.h
Dependency optimization impact
Build time reduced to about 12m30s
Summary
• Google has done a great job of optimizing Android builds
• But there’s still room for improvement!
Electric Cloud
Android Software Delivery Solution
Test (CTS) Optimization
Upto 70% test time acceleration
Android Release Process Workflows
Out of the box best practices, integrations
Build
QA
Release
CTS
Reduce software delivery cycle time by 70%
MIPS/EC Webinar, Feb 2013
MIPS/EC Webinar, Feb 2013
MIPS/EC Webinar, Feb 2013
MIPS/EC Webinar, Feb 2013
MIPS/EC Webinar, Feb 2013
MIPS/EC Webinar, Feb 2013
MIPS/EC Webinar, Feb 2013
Android Software Delivery Solution - Key Benefits
Blazing Android Builds
Fast comprehensive CTS testing
End-to-end B-T-R process & visibility
Questions?
David Rosen, Product Manager
drosen@electric-cloud.com
@adr0sen

Mais conteúdo relacionado

Mais procurados

Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance MistakesAndreas Grabner
 
HSPS 2015 - SharePoint Performance Santiy Checks
HSPS 2015 - SharePoint Performance Santiy ChecksHSPS 2015 - SharePoint Performance Santiy Checks
HSPS 2015 - SharePoint Performance Santiy ChecksAndreas Grabner
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsAndreas Grabner
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyAndreas Grabner
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!Andreas Grabner
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Andreas Grabner
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersAndreas Grabner
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance MetricsAndreas Grabner
 
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Aysylu Greenberg
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsAndreas Grabner
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellJeroen Resoort
 
Continuous Deployment to the cloud
Continuous Deployment to the cloudContinuous Deployment to the cloud
Continuous Deployment to the cloudVMware Tanzu
 
Docker Docker - Docker Security - Docker
Docker Docker - Docker Security - DockerDocker Docker - Docker Security - Docker
Docker Docker - Docker Security - DockerBoyd Hemphill
 
DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)Wooga
 
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)Roberto Pérez Alcolea
 
Introducing Bangalore Meetup for Kubernetes Chaos Engineering
Introducing Bangalore Meetup for Kubernetes Chaos EngineeringIntroducing Bangalore Meetup for Kubernetes Chaos Engineering
Introducing Bangalore Meetup for Kubernetes Chaos Engineeringkiran mova
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersBurr Sutter
 

Mais procurados (20)

Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance Mistakes
 
HSPS 2015 - SharePoint Performance Santiy Checks
HSPS 2015 - SharePoint Performance Santiy ChecksHSPS 2015 - SharePoint Performance Santiy Checks
HSPS 2015 - SharePoint Performance Santiy Checks
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance Problems
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance Metrics
 
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
 
(R)evolutionize APM
(R)evolutionize APM(R)evolutionize APM
(R)evolutionize APM
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshell
 
Continuous Deployment to the cloud
Continuous Deployment to the cloudContinuous Deployment to the cloud
Continuous Deployment to the cloud
 
Deployments in one click!
Deployments in one click!Deployments in one click!
Deployments in one click!
 
Big data made easy with a Spark
Big data made easy with a SparkBig data made easy with a Spark
Big data made easy with a Spark
 
Docker Docker - Docker Security - Docker
Docker Docker - Docker Security - DockerDocker Docker - Docker Security - Docker
Docker Docker - Docker Security - Docker
 
DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)
 
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
 
Introducing Bangalore Meetup for Kubernetes Chaos Engineering
Introducing Bangalore Meetup for Kubernetes Chaos EngineeringIntroducing Bangalore Meetup for Kubernetes Chaos Engineering
Introducing Bangalore Meetup for Kubernetes Chaos Engineering
 
Cloud State of the Union for Java Developers
Cloud State of the Union for Java DevelopersCloud State of the Union for Java Developers
Cloud State of the Union for Java Developers
 

Destaque

Assigning IP Address
Assigning IP AddressAssigning IP Address
Assigning IP Addressshubifareek
 
Unified Communications and Collaborations (UC&C)
Unified Communications and Collaborations (UC&C)Unified Communications and Collaborations (UC&C)
Unified Communications and Collaborations (UC&C)ALTANAI BISHT
 
Gas Detector Training
Gas Detector TrainingGas Detector Training
Gas Detector TrainingPiplu Das
 
Apresentação Zmags em Português
Apresentação Zmags em PortuguêsApresentação Zmags em Português
Apresentação Zmags em PortuguêsZmags_Brasil
 
3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar
3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar
3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengarFandy Neutron
 
Hackaday ramudroid 6.5
Hackaday ramudroid 6.5Hackaday ramudroid 6.5
Hackaday ramudroid 6.5ALTANAI BISHT
 
Tadiran gateway
Tadiran gatewayTadiran gateway
Tadiran gatewayNTCOM Ltd
 
Beautiul Beijing Bird Nest (美麗北京鳥巢)
Beautiul Beijing Bird Nest (美麗北京鳥巢)Beautiul Beijing Bird Nest (美麗北京鳥巢)
Beautiul Beijing Bird Nest (美麗北京鳥巢)Chung Yen Chang
 
FYP Report-Xing Dan
FYP Report-Xing DanFYP Report-Xing Dan
FYP Report-Xing Dan#Xing Dan#
 
Power Point frases amb suport visual
Power Point frases amb suport visualPower Point frases amb suport visual
Power Point frases amb suport visualYolanda Roset Aligué
 
RFID in Assets and Library Management
RFID in Assets and Library Management RFID in Assets and Library Management
RFID in Assets and Library Management ALTANAI BISHT
 
3 c brasil-folleto-2014
3 c brasil-folleto-20143 c brasil-folleto-2014
3 c brasil-folleto-2014David Arias
 
Namrata electricals profile v1
Namrata electricals profile v1Namrata electricals profile v1
Namrata electricals profile v1NARESH MAHADIK
 

Destaque (20)

information highway
information highwayinformation highway
information highway
 
Assigning IP Address
Assigning IP AddressAssigning IP Address
Assigning IP Address
 
Unified Communications and Collaborations (UC&C)
Unified Communications and Collaborations (UC&C)Unified Communications and Collaborations (UC&C)
Unified Communications and Collaborations (UC&C)
 
10 led-30 w-shop lamp
10 led-30 w-shop lamp10 led-30 w-shop lamp
10 led-30 w-shop lamp
 
My grandfather
My grandfatherMy grandfather
My grandfather
 
Auma
AumaAuma
Auma
 
Alta edad media
Alta edad mediaAlta edad media
Alta edad media
 
Gas Detector Training
Gas Detector TrainingGas Detector Training
Gas Detector Training
 
Apresentação Zmags em Português
Apresentação Zmags em PortuguêsApresentação Zmags em Português
Apresentação Zmags em Português
 
3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar
3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar
3 solusi memperkuat ide ide kreatif melalui bertanya dan mendengar
 
Hackaday ramudroid 6.5
Hackaday ramudroid 6.5Hackaday ramudroid 6.5
Hackaday ramudroid 6.5
 
Tadiran gateway
Tadiran gatewayTadiran gateway
Tadiran gateway
 
Beautiul Beijing Bird Nest (美麗北京鳥巢)
Beautiul Beijing Bird Nest (美麗北京鳥巢)Beautiul Beijing Bird Nest (美麗北京鳥巢)
Beautiul Beijing Bird Nest (美麗北京鳥巢)
 
Brewbot
BrewbotBrewbot
Brewbot
 
FYP Report-Xing Dan
FYP Report-Xing DanFYP Report-Xing Dan
FYP Report-Xing Dan
 
Sample essay
Sample essaySample essay
Sample essay
 
Power Point frases amb suport visual
Power Point frases amb suport visualPower Point frases amb suport visual
Power Point frases amb suport visual
 
RFID in Assets and Library Management
RFID in Assets and Library Management RFID in Assets and Library Management
RFID in Assets and Library Management
 
3 c brasil-folleto-2014
3 c brasil-folleto-20143 c brasil-folleto-2014
3 c brasil-folleto-2014
 
Namrata electricals profile v1
Namrata electricals profile v1Namrata electricals profile v1
Namrata electricals profile v1
 

Semelhante a DESIGN West 2013 Presentation: Accelerating Android Development and Delivery

Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Sacha Leprêtre
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsTechWell
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptnRob Jahn
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Vadym Kazulkin
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimizationwipjam
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationKyle Hailey
 
What is the Siemens Open Library, and How it Decreased Development Time for E...
What is the Siemens Open Library, and How it Decreased Development Time for E...What is the Siemens Open Library, and How it Decreased Development Time for E...
What is the Siemens Open Library, and How it Decreased Development Time for E...DMC, Inc.
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDocker, Inc.
 
Solving the System-Level Design Riddle
Solving the System-Level Design RiddleSolving the System-Level Design Riddle
Solving the System-Level Design RiddleDesign World
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Convince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week BrazilConvince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week BrazilVadym Kazulkin
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Maximiliano Firtman
 
Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.UA Mobile
 
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in productionNETFest
 
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Andreas Grabner
 

Semelhante a DESIGN West 2013 Presentation: Accelerating Android Development and Delivery (20)

Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
 
Android Lollipop
Android LollipopAndroid Lollipop
Android Lollipop
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimization
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualization
 
What is the Siemens Open Library, and How it Decreased Development Time for E...
What is the Siemens Open Library, and How it Decreased Development Time for E...What is the Siemens Open Library, and How it Decreased Development Time for E...
What is the Siemens Open Library, and How it Decreased Development Time for E...
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General Session
 
2014 12-10 aimee
2014 12-10 aimee2014 12-10 aimee
2014 12-10 aimee
 
Solving the System-Level Design Riddle
Solving the System-Level Design RiddleSolving the System-Level Design Riddle
Solving the System-Level Design Riddle
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Convince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week BrazilConvince your boss to go Serverless at serverless week Brazil
Convince your boss to go Serverless at serverless week Brazil
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
 
WebRTC Status Update - 2017Q2
WebRTC Status Update - 2017Q2WebRTC Status Update - 2017Q2
WebRTC Status Update - 2017Q2
 
Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.
 
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
 
Lick my Lollipop
Lick my LollipopLick my Lollipop
Lick my Lollipop
 
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

DESIGN West 2013 Presentation: Accelerating Android Development and Delivery

  • 1. Accelerating Android Development David Rosen, Product Manager drosen@electric-cloud.com @adr0sen Design West 2013
  • 2. What’s this Android buzz all about? 2
  • 3. Qualcomm Reference Design Program <60 days TTM, and pushing for faster Source: http://www.qualcomm.com/connect/analyst-relations/events/americas-analyst-summit-2012
  • 4. Android Development Landscape Real-world challenges at large APAC mobile device maker
  • 5. Automotive 6% Mobile 38% Consumer electronics 18% Industrial control and automation 6% Medical 4% Military/aero space 3% Other 25% Users of Android by Vertical Electric Cloud Android/Embedded Survey (Q1 2013) • Survey • Focused on Android development & delivery • Global embedded contacts in Electric Cloud marketing lists • 350+ respondents • 175+ Android
  • 6. Android Delivery Process Today Technical Challenges • Slow Android Builds • Slow, Complex CTS Testing • Complex B-T-R Matrix • Custom Testing – Volume, Complexity Negative Business Impacts • Slow Time to Market • Poor Quality of products • Poor productivity of teams Less than 1 hour, 22.5% 1-4 hours, 57.5 % 4-8 hours, 15.0 % More than 8 hours, 5.0% Avg. time to execute CTS Less than 5 minutes, 7.8 % 5-20 minutes, 21. 0% 20 minutes - 1 hour, 28.8% 1-4 hours, 27.0 % More than 4 hours, 15.3 % Avg. release build time
  • 7. Agenda • Accelerating the Android Build • Accelerating the Android CTS execution • Accelerating the end-to-end Android Development Lifecycle
  • 9. Why look at Android builds? • Android is everywhere • 68% of global mobile phone market share1 • Explosion of non-phone applications • Automotive (Saab, Renault) • Entertainment (Ouya, Nvidia) • Exercise equipment (NordicTrack) • Rice cookers! (Panasonic) • Android is everywhere • … and that means thousands of developers building Android • What if we can make those builds faster? • How would your development process change? • How much more could you achieve? 1 Source: Gartner, February 2013
  • 10. What is (and is not) covered in this part of the talk? • Build acceleration techniques fall into two broad categories: • Hardware improvements like faster CPU’s and better disks • Software improvements like smarter build tools and faster compilers • In general, hardware and software improvements are complimentary • If you want the fastest possible builds, leverage both! • This talk is about software techniques for build acceleration • Given a fixed hardware platform, how fast can we build Android? • Or, what do you do when you reach the limits of your hardware?
  • 11. 0 2,000,000 4,000,000 6,000,000 8,000,000 10,000,000 12,000,000 14,000,000 16,000,000 18,000,000 Linux Kernel Android Mozilla Firefox Chromium Webkit AOSP LOC Evolution Jan 2009 – Jan 20131 1 Source: http://www.ohloh.net, http://en.wikipedia.org/wiki/Android_version_history (February 2013)
  • 12. +15% +123% +19% +2% +30% +12% +17% +2% 0 2 4 6 8 10 12 14 16 18 00:00 00:14 00:28 00:43 00:57 01:12 01:26 01:40 2.2 2.3.4 4.0.1 4.1.1 4.2.2 Millions Build Time LOC AOSP Build Evolution Android Version Release Date LOC1 LOC Growth % GNU Make Build Time2 Build Time Growth % 2.2 May 2010 8,837,858 - 28m55s - 2.3.4 April 2011 11,492,324 30% 33m10s 15% 4.0.1 October 2011 12,827,330 12% 1h13m54s 123% 4.1.1 July 2012 15,028,331 17% 1h28m11s 19% 4.2.2 February 2013 15,266,8033 2% 1h32m56s 2% 1 http://www.ohloh.net, 2 Builds performed on 8-core 16GB RAM server, 3 LOC data as of December 2012
  • 13. Common wisdom about Android builds • I can just… • … add more cores • … use distcc • … use ccache • “The Android build is as optimized as it can be!”
  • 14. The common wisdom is wrong.
  • 15. Sidebar: how much faster is “interesting”? • Some large mobile device makers run > 50K builds/week • At 15 minutes per build that’s 12,500 hours of build time • A reduction of just one minute would save 800 hours every week • What about wait time? • Faster builds = more iterations • Faster builds = higher quality • Faster builds = lower time to market
  • 16. How fast is GNU make? • Best time: ~15m • 48-cores • 128GB RAM • No ccache
  • 17. Problem: Visibility • Knowing the end-to-end time is great but not actionable • We need visibility • Where is the time going? • What are the bottlenecks? • Are there opportunities for improvement? • How do we get that visibility? • Instrument the build… somehow! strace, echo, hack gmake, or… • ElectricInsight • Visualization and analysis of builds run with ElectricMake • Let’s pump this build through emake and see how it looks!
  • 19. What can we see from here? • An ideal build would look like a tightly packed box • Overall looks almost perfect – well done, Android team! • But! a couple of things stand out: • Crazy long parse time1 • Gaps at the end of the build, indicative of serializations • We’ll look at both of these, but first: what if we just use more cores? 1 emake parsing may be slower than gmake parsing
  • 20. Longest serial chain • Best possible runtime is about 15m Best possible is about 15m
  • 22. What else can we learn? • Lots of non-compile work in the build - ~25% of total time
  • 23. Problem: long parse time • Why do we build? • To transform sources into deliverables (programs, docs, etc). • Does parsing makefiles transform sources into deliverables? • Nope. • Parsing makefiles is pure overhead • But you have to tell make what to do somehow • Unless you want to manually invoke the compiler, linker, etc.
  • 24. Solution: parse avoidance • What if we don’t parse (every time)? • Makefiles don’t change very often, so why reparse every time? • Reuse parse results from a previous build, as long as… • Makefiles are unchanged (MD5) • Command-line is unchanged • Environment is unchanged • How do we do it? • Electric Make already has parse results in a reloadable form, just need to add cache management • GNU make doesn’t, but could be modified
  • 25. Parse avoidance impact Build time reduced to about 13m30s
  • 26. Problem: serializations • Gaps in visualization suggest serializations • Q: How many dependencies are there in the Android build? • A: More than you think!
  • 27. Android Dependency Graph • Dump all makefile rules • 100,000 files/targets • 1,990,628 dependencies
  • 28. Dependencies in Android • ~19 dependencies per file: why so many? • Consider a typical build structure: • Some files will have many dependencies • Most have only a few • What is going on in Android? lib.a: foo.o bar.o foo.o: foo.c foo.h util.h bar.o: bar.c bar.h util.h
  • 29. Superfluous dependencies in Android • Do we really need all 1.9M dependencies? • The filesystem can tell us! • Collect a list of files actually used to generate a target • Compare to the list of prerequisites specified in the makefile • Example: • Why not run foo.txt and bar.txt in parallel? foo.txt: echo “Hello” > foo.txt bar.txt: foo.txt echo “World” > bar.txt
  • 30. Actual dependencies in Android • 100,000 files/targets • 288,804 dependencies
  • 31. Specified vs. Actual dependencies in Android Specified Actual
  • 32. Solution: dependency optimization • Impossible to manually eliminate superfluous dependencies • Electric Make can prune them automatically • If you use gmake, you can achieve the same effect: • Remove existing dependency specifications • Generate minimal dependency specifications from emake data • Before: • After: $(OBJECTS): %.o: %.cpp $(ALL_HEADERS) $(OTHER_DEPS) $(COMPILE.CC) $(OBJECTS): %.o: %.cpp $(COMPILE.CC) foo.o: foo.h util.h bar.o: bar.h util.h generated.h
  • 33. Dependency optimization impact Build time reduced to about 12m30s
  • 34. Summary • Google has done a great job of optimizing Android builds • But there’s still room for improvement!
  • 35. Electric Cloud Android Software Delivery Solution
  • 36. Test (CTS) Optimization Upto 70% test time acceleration
  • 37. Android Release Process Workflows Out of the box best practices, integrations Build QA Release CTS Reduce software delivery cycle time by 70%
  • 45. Android Software Delivery Solution - Key Benefits Blazing Android Builds Fast comprehensive CTS testing End-to-end B-T-R process & visibility
  • 46. Questions? David Rosen, Product Manager drosen@electric-cloud.com @adr0sen

Notas do Editor

  1. Point out that axis is time in minutes, rows are cores/threads, boxes are individual targets