Difference between revisions of "Improving Android Boot Time"

From eLinux.org
Jump to: navigation, search
(Resources: add link and info about parseZipArchive-no-sig-check patch)
m (Presentation)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
This page has notes and materials in support of Tim Bird's presentation "Improving Android Bootup Time",
 
This page has notes and materials in support of Tim Bird's presentation "Improving Android Bootup Time",
which he is giving at [http://events.linuxfoundation.org/events/linuxcon LinuxCon North America, 2010].
+
which he gave at [http://events.linuxfoundation.org/events/linuxcon LinuxCon North America, 2010].
  
 
== Abstract ==
 
== Abstract ==
Line 6: Line 6:
  
 
== Presentation ==
 
== Presentation ==
* [[Media:Android-bootup-time-linuxcon-2010-08.pdf]]
+
Here's the final presentation which was given at LinuxCon North America, August 2010:
 +
* [[Media:Android-bootup-time-linuxcon-2010-08.pdf|Android-bootup-time-linuxcon-2010-08.pdf]]
  
 
== Outline ==
 
== Outline ==
Line 12: Line 13:
  
  
== Raw Results ==
+
== Raw Data ==
 
+
[''Still need to post my raw data here'']
  
 
== Resources ==
 
== Resources ==
Line 26: Line 27:
 
=== instrumentation patches ===
 
=== instrumentation patches ===
 
Here is a patch which instruments the class preloading and the package scanning, to give more verbose
 
Here is a patch which instruments the class preloading and the package scanning, to give more verbose
output during these phases of the bootup.  Note that these will overrun your logcat buffers, so you may
+
output during these phases of the bootup.  Note that these will make booting much more verbose, which
need to grab them with the 'logcat' command, soon after the operation you are interested in occurs.
+
will very likely overrun your logcat buffers. So you may need to grab the data with the 'logcat'
 +
command soon after the operation you are interested in occurs.
 
* [[Media:Android-boot-instrumentation.patch]]
 
* [[Media:Android-boot-instrumentation.patch]]
  

Latest revision as of 18:24, 13 January 2011

This page has notes and materials in support of Tim Bird's presentation "Improving Android Bootup Time", which he gave at LinuxCon North America, 2010.

Abstract

Android is a relatively new distribution of Linux, with a completely different user space implementation, compared to desktop or enterprise Linux. It also has some rather horrible boot times. But it's popular - so Tim decided to take a look and see if the bootup time of a standard Android system could be improved. This presentation describes how well he succeeded in this venture. Tim will present methods of measuring kernel and user-space bootup time on an Android system, as well as present some ideas for places where Android bootup time could be improved.

Presentation

Here's the final presentation which was given at LinuxCon North America, August 2010:

Outline

See Improving Android Boot Time Outline


Raw Data

[Still need to post my raw data here]

Resources

logdelta

Here is the 'logdelta' program, which can be used to see the time between logcat lines. Using logcat, grep, and logdelta, you can usually figure out how long certain operations are taking, based on the log timestamps.

  • Media:Logdelta.txt - the logdelta program
    • Note: I had to give the program a .txt extension, in order to upload it to the elinux wiki. When you download it, rename it and make it executable with
      • mv Logdelta.txt logdelta; chmod a+x logdelta

instrumentation patches

Here is a patch which instruments the class preloading and the package scanning, to give more verbose output during these phases of the bootup. Note that these will make booting much more verbose, which will very likely overrun your logcat buffers. So you may need to grab the data with the 'logcat' command soon after the operation you are interested in occurs.

parseZipArchive patch

This patch removes the per-file signature check in parseZipArchive(). It also adds some logging to show how long the open operation is taking, in ZipFileRO::open

These routines are in the source file: frameworks/base/libs/utils/ZipFileRO.cpp