An Analysis of Linux Boot Times
Total Page:16
File Type:pdf, Size:1020Kb
Faculty of Computer Science Real-Time Group Diploma Thesis An Analysis of Linux Boot Times Author: Florian Strunk Author e-mail: Date of Issue: September 13, 2007 Date of Submission: March 10, 2008 Supervisor: Dr.-Ing. Robert Baumgartl Florian Strunk An Analysis of Linux Boot Times Diploma Thesis, Chemnitz University of Technology, 2008 Abstract For consumer devices it is necessary that they are in a ready to use state approximately in a few of seconds (10 -15 sec.) after power on. So far one main objection against the usage of Linux for consumer devices is its time-consuming boot process. In this thesis it is examined, what the history of the boot times of Linux in the last years is. For this purpose some of the popularly distributions in the versions of the last two years are evaluated. Besides the influence of several mass storages (local and network) and different number of cores of the CPU is shown. In this thesis a possibility is presented, which accelerates the starting up of Linux up to 60 percent compared to the new init- system upstart. For decreasing the time to get in the ready to use state several optimizations are recommended. Because of the reason that the operating system is not only responsible for the total boot up time, the execution of several firmwares are examined too. Thanks I would like to thank Dr.-Ing. Robert Baumgartl for the supervision of this diploma thesis and Nigel Cunningham for the help to let me understand his project TuxOnIce. Overview of contents 1 Introduction...............................................................................................17 2 State of the art...........................................................................................19 3 Measuring methods..................................................................................27 4 Myth of continuously rising boot times..................................................35 5 Research of the latest versions...............................................................41 6 Influence of several mass storages to the boot behavior.....................47 7 Tweaking Ubuntu 7.10 to reduce boot time............................................61 8 Alternative to the boot process...............................................................68 9 Evaluation of embedded systems (IA32)................................................78 10 Comparison between several firmwares..............................................82 11 Conclusion...............................................................................................88 12 Outlook.....................................................................................................90 A Test systems.............................................................................................91 B Technical data of mass storages............................................................98 C Adapter (SATA / IDE / CF).......................................................................103 D Modification of the Mac Mini.................................................................105 E Charts of Bootchart................................................................................107 F Additional tables.....................................................................................120 G Source code............................................................................................123 Glossary......................................................................................................127 References..................................................................................................129 Contents 1 Introduction...............................................................................................17 2 State of the art...........................................................................................19 2.1 Overview of the boot process....................................................................................19 2.2 Description of the boot process.................................................................................19 2.2.1 Power on, CPU reset..........................................................................................19 2.2.2 Execution of firmware ........................................................................................19 2.2.2.1 PC-BIOS......................................................................................................19 2.2.2.2 LinuxBios.....................................................................................................21 2.2.2.3 (U)EFI..........................................................................................................22 2.2.3 Load boot loader.................................................................................................23 2.2.4 Load operation system.......................................................................................23 2.2.4.1 Kernel..........................................................................................................23 2.2.4.2 Init................................................................................................................23 2.3 Previous publications on “Boot Process and Linux”..................................................25 3 Measuring methods..................................................................................27 3.1 Introduction of the measuring methods.....................................................................27 3.1.1 Stop watch..........................................................................................................27 3.1.1.1 Short Description of using a stop watch.....................................................27 3.1.1.2 Measuring points.........................................................................................27 3.1.2 Bootchart............................................................................................................27 3.1.2.1 Short Description of Bootchart....................................................................27 3.1.2.2 Measuring points.........................................................................................28 3.1.2.3 How to install Bootchart..............................................................................28 3.1.2.4 Sample of a Bootchart chart.......................................................................29 3.1.3 Fbtt (Florian's Boot Time Tool)...........................................................................29 3.1.3.1 Short description of Fbtt..............................................................................29 3.1.3.2 Measuring points.........................................................................................30 3.1.3.3 How to install Fbtt........................................................................................30 3.1.3.4 Sample of a Fbtt output file.........................................................................30 3.2 Comparison of measuring methods...........................................................................31 3.2.1 Description..........................................................................................................31 3.2.2 Results................................................................................................................32 3.2.3 Discussion..........................................................................................................33 4 Myth of continuously rising boot times..................................................35 4.1 Introduction of the different distributions....................................................................35 - 6 - 4.1.1 Debian................................................................................................................35 4.1.2 Ubuntu................................................................................................................36 4.1.3 OpenSUSE / SuSE Linux...................................................................................36 4.2 Configuration of the distribution.................................................................................36 4.3 Used measuring methods..........................................................................................37 4.4 Results.......................................................................................................................38 4.5 Discussion..................................................................................................................39 5 Research of the latest versions...............................................................41 5.1 Evaluation of boot times with using traditional mass storage....................................41 5.1.1 Configuration......................................................................................................41 5.1.2 Measuring methods............................................................................................41 5.1.3 Results................................................................................................................42 5.1.4 Discussion..........................................................................................................42 5.2 Analysis of the boot process with Bootchart .............................................................43 5.2.1 Configuration......................................................................................................43 5.2.2 Used measuring methods..................................................................................43