[Initscripts-ng-commits] r115 - in /trunk/www/soc2006-bootsystem/deliverable3: debianboot.bib debianboot_d3.tex

dvictoria-guest at users.alioth.debian.org dvictoria-guest at users.alioth.debian.org
Sat Aug 19 14:21:11 UTC 2006


Author: dvictoria-guest
Date: Sat Aug 19 14:21:07 2006
New Revision: 115

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=115
Log:
deliverable3 update

Modified:
    trunk/www/soc2006-bootsystem/deliverable3/debianboot.bib
    trunk/www/soc2006-bootsystem/deliverable3/debianboot_d3.tex

Modified: trunk/www/soc2006-bootsystem/deliverable3/debianboot.bib
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/www/soc2006-bootsystem/deliverable3/debianboot.bib?rev=115&op=diff
==============================================================================
--- trunk/www/soc2006-bootsystem/deliverable3/debianboot.bib (original)
+++ trunk/www/soc2006-bootsystem/deliverable3/debianboot.bib Sat Aug 19 14:21:07 2006
@@ -1,3 +1,9 @@
+
+ at Article{LSBwikiguide,
+	title="How to LSBize an init script",
+	note="\href{http://wiki.debian.org/LSBInitScripts}{http://wiki.debian.org/LSBInitScripts}"}
+
+
 @Article{ubunto-shtodash,
 	title="Ubuntu Feature Specification: Dash as /bin/sh",
 	note="\href{https://launchpad.net/distros/ubuntu/+spec/dash-as-bin-sh}{https://launchpad.net/distros/ubuntu/+spec/dash-as-bin-sh}"}

Modified: trunk/www/soc2006-bootsystem/deliverable3/debianboot_d3.tex
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/www/soc2006-bootsystem/deliverable3/debianboot_d3.tex?rev=115&op=diff
==============================================================================
--- trunk/www/soc2006-bootsystem/deliverable3/debianboot_d3.tex (original)
+++ trunk/www/soc2006-bootsystem/deliverable3/debianboot_d3.tex Sat Aug 19 14:21:07 2006
@@ -97,16 +97,16 @@
 
 \subsection{dash}
 
-Use dash instead of bash reduces the boot time from around 2 to 6\cite{margablog-boot} seconds depending on the method and system used. It seems to be the \textit{hotspot} with the bigger influence. It may be implemented in two ways:
+\textit{Dash} is a smaller shell and using it instead of the default /textit{bash} we get a reduction of the boot time. The Ubuntu distribution already implements it by linking /bin/sh to /bin/dash~\cite{ubunto-shtodash}. Besides, during Debconf6, Margarita Manterola presented a time reduction of 6 seconds by using dash in Debiani~\cite{margablog-boot}. In our previous deliverable 2~\cite{debianboot-d2} we present results of up to 4 seconds reduction of the boot time. Therefore, using dash during the boot process seems to be the \textit{hotspot} with the bigger influence. 
+
+Dash may be implemented during boot in two ways:
 
 \begin{enumerate}
 \item by linking /bin/sh to /bin/dash, and
 \item by changin the init scripts to use dash.
 \end{enumerate}
 
-The first approach caused a 4 second improvement while the second approach a 2 second improvement in our test system. As a remark, linking /bin/sh to /bin/dash has been already implemented by Ubuntu~\cite{ubunto-shtodash}
-
-To first approach is implemented as follows:
+The first approach caused a 4 second improvement while the second approach a 2 second improvement in our test system. The first approach is implemented as follows:
 
 \textit{apt-get install dash}
 \textit{dpkg-divert --add /bin/sh}
@@ -122,26 +122,73 @@
 \textit{apt-get remove --purge dash}
 \textit{apt-get install --reinstall bash}
 
-For the second approach, the test consisted of changing the shell used for all the scripts in /etc/init from /bin/sh to /bin/dash
-
-
-
- It depends on 
-around 6 seconds in the tests made by Margarita Manterola\cite{margablog-boot}. This seems to be due to the smaller size of dash. The time reduction for our tests was only of 3 seconds.
+For the second approach, the test consisted of modifying the first line of the init scripts in /etc/init.d from  #!/bin/sh to #!/bin/dash.
+
+
+The first approach caused a 4 second improvement while the second approach a 2 second improvement in our test system. 
+
+ADD BOOTCHART FIGURES COMMENTED
+
+\subsection{Reordering the init-scripts}
+
+Normally, the init-scripts are executed one-by-one during the boot process according to the order in /etc/rcS.d and /etc/rc2.d. The order is important to satisfy runtime dependencies, i.e., to satisfy the requirements for an init script to run properly like \textit{udev} requires \textit{mountvirtfs}. Besides, the order has shown to be influential on the boot time. 
+
+Some distributions like SUSE have taken runtime dependencies seriously and implemented a system to keep the init scripts ordered\cite{suseReference}. In Debian, the script order still depends on the number assigned by the maintainer. This approach is prone to errors and normally requires somebody to file a bug report for them to get corrected.
+
+Margarita Manterola already showed in Debconf6 a boot time improvement of 2 seconds by reordering the scripts manually\cite{margablog-boot}. These satisfactory results lead to consider this hotspot as important but the results presented in this deliverable made us consider it as one of the main \textit{hotspots}. 
+
+There are mainly two ways to order the init-scripts: 
+
+
+\begin{enumerate}
+\item trial-and-error based on experience and/or a deep understanding of each of the init-scripts,
+\item using explicit run-time dependencies written by the experts on each init-script.
+\end{enumerate}
+
+The first approach is an experimental optimization problem with a different solution for each system configuration and therefore not feasible in the long-run. The second approach requires the init-script maintainers to provide explicit run-time dependencies and would adapt to each possible system configuration. The latter has been already implemented in the SUSE distribution mainly through the insserv and update-rc programs~\cite{sudeReference}.
+
+The program insserv reorders the init script symbolic pools (/etc/rcX.d) and uses LSB-compliant headers in the scripts. Besides, it contains some run-time dependencies for some init scripts that don't provide them yet. Nevertheless, the current results are rather poor and /etc/rcS.d is not modified. Besides, in /etc/rc2.d many scripts from /etc/rcS.d are repeated.
+
+Using insserv without modifications, the boot time increases by 2 seconds, i.e., 2 seconds slower. On the other hand, with a slightly different order and removing some repeated scripts, a 2 second faster boot time than the original is obtained. Furthermore, by deleting all scripts repeated from /etc/rcS.d, a total of 4 seconds time reduction is obtained.
+
+
+SCRIPT ORDER
+
+BOOTCHARTS
+
+We implement insserv as:
+
+apt-get install insserv
+update-bootsystem-insserv
+
+and removed as:
+
+update-bootsystem-insserv restore
+apt-get remove --purge insserv
+
+
+
+An approach towards using explicit run-time dependencies is provided by the Linux Standard Base(LSB) through a convention of the form:
+
+%### BEGIN INIT INFO
+%# Provides:          x-display-manager gdm
+%# Should-Start:      console-screen
+%# Required-Start:    $local_fs $remote_fs
+%# Required-Stop:     $local_fs $remote_fs
+%# Default-Start:     2 3 4 5
+%# Default-Stop:      S 0 1 6
+%# Short-Description: GNOME Display Manager
+%# Description:       Debian init script for the GNOME Display Manager
+%### END INIT INFO
+
+In order to make it easier for Debian maintainters to provide init-scripts with LSB-compliance a maintainers guide was published as part of this project~\cite{LSBwikiguide}. Besides, a patch has been provided for lintian to check LSB-compliance. 
 
 
 \subsection{hwclock}
 
-Setting up the hardware clock in the background was proposed by Margarita Manterola and she obtained a reduction of 6 seconds in the boot time\cite{margablog-boot}. Nevertheless, running hwclok on the background may cause problems with processes that can get confused if the time changes while they are running. This is the case of startpar. To overcome this problem, startpar doesn't run the scripts with sh extension in parallel.
-
-We tried to load the hwclock on the background with a 2 seconds reduction in the boot time.
-
-
-
-
-\subsection{Remove depmod from the boot process} 
-
-Depmod is not used any more in sid's module-init-tools and this is one of the hotspots. This was removed as a result from a discussion started by Margarita Manterola in debian-devel. Just by adding it again from an old script, the 2 second reduction from hwclock was achieved. 2 seconds were gained by Margarita Manterola\cite{margablog-boot} as well. 
+Setting up the hardware clock improves the boot time by setting it in the background. This approach was tested and presented in Debconf6 by Margarita Mangerola with a 6 second reduction\cite{margablog-boot}. During the project we've tried hwclock in the background with a 2 second time reduction~\cite{debianboot-d2}. Nevertheless, running hwclock on the background may cause problems with processes that can get confused if the time changes while they are running. Therefore, just hwclock.sh is set on the background while hwclockfirst.sh is executed as usual. 
+
+
 
 
 
@@ -151,10 +198,6 @@
 
 One problem with this hotspot is related to the network status return after running "ifup -a". In the script "ifup -a" is inside an if statement such that the status return of the network can be handled properly. This makes no sense if we send it to the background. Therefore, if this approach is widely accepted, the current init script will have to be modified.
 
-
-\textbf{LSB-compliance and reordering bootscripts}
-
-LSB compliance in the init scripts can be used to reorder the scripts as shown in the SUSE boot with insserv~\cite{suseReference}. Lintian rules should be considered as well during the implementation. Just by reordering some processes around 2 seconds could be gained\cite{margablog-boot}. This hotspot has not been tested but a script to check LSB compliance was created and the ordering script of insserve is going to be modified.
 
 
 \subsection{Parallel execution of boot scripts}




More information about the Initscripts-ng-commits mailing list