ThinClientFasterStartup

Differences between revisions 7 and 20 (spanning 13 versions)
Revision 7 as of 2005-11-03 15:19:05
Size: 3048
Editor: 228_220_103_66-WIFI_HOTSPOTS
Comment:
Revision 20 as of 2008-08-06 16:28:01
Size: 4114
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
 * '''Created''': [[Date(2005-10-31T22:27:58Z)]] by OliverGrawert  * '''Created''': <<Date(2005-10-31T22:27:58Z)>> by OliverGrawert
Line 10: Line 10:
    * various bootscripts from various packages
Line 12: Line 11:
    * ntpdate
Line 23: Line 23:
Matthew gives a class on usability at university where uses LTSP in his class, if he's te first in the class for the day he needs to plan extra time for booting the Thin Clients for the pupils. Matthew gives a class on usability at university where he uses LTSP in his class, if he's the first in the class for the day he expects his pupils to be able to work immediately after switching on the Thin clients.
Line 27: Line 27:
The bootprocess of LTSP Thin Clients as well as the default bootstrapping of the thin client chroot environment. The boot process of LTSP Thin Clients as well as the default bootstrapping of the thin client chroot environment.
Line 32: Line 32:
 * Fix the delay of nfs mounting in klibc  * Fix the delay of nfs mounting in klibc (this seems to be a bug that needs to be tracked)
Line 34: Line 34:
 * Remove the "sleep 3" from the initramfs nfs script
 * start LDM as early as possible in the bootprocess
 * find the slowing down part in syslogd (strace) and fix it
 * run a ntpd on the ltsp server and make the thin client pull its time from there
 * make ltsp-build-client's debootstrapping install only the bare minimum needed (probably introduce a thin client mode)
 * drop module-init-tools from the bootprocess
 * find any silent scripts that run and might slow down the bootprocess
 * Remove the "sleep 3" from the initramfs nfs script (it was for debugging the above klibc timeout and was forgotten to be removed somehow)
 * Start LDM as early as possible in the bootprocess (running it as first service in rc2.d is possible)
 * Find the slowing down part in syslogd (strace) and fix it or remove syslogd completely from the thin client startup unless the user configures a SYSLOG_HOST in lts.conf.
 * Disable ntpdate at boot unless the user explicitly configures an NTP_SERVER in lts.conf, disable the clock in ldm.
Line 48: Line 45:
  (according to UdevRoadmap both being moved to initramfs and being replaced with a "catchup")
Line 50: Line 48:
 * S40networking
 * S50alsa-utils
  (being removed, replaced by initial boot)
 * S40networking (for spoof protection etc)
 * S50alsa-utils (needed for sound)
Line 54: Line 53:
This seems to be the bare minimum of needed bootscripts.
The bootprocess still needs ~60 seconds from hitting the powerbutton to being able to log in at the loginmanager (which is about as much as a normal ubuntu workstation installation), mostly caused by initramfs and hotplug which should be sped up by changes Scott will make to the initramfs/hotplug architecture.
This seems to be the bare minimum of bootscripts.
The boot process still needs ~60 seconds from hitting the power button (which includes BIOS indeed) to being able to log in at the login manager (which is about as much as a normal ubuntu workstation installation), mostly caused by initramfs and hotplug which should be sped up by changes Scott will make to the initramfs/hotplug architecture (see UdevRoadmap).   Sadly one slowdown that wont be avoidable is the xorg autodetection, probing the devices takes between 20 and 30 seconds depending on the feedback speed of the hardware.
Line 59: Line 60:
Changes in ltsp-build-client are required to remove the unneeded startup scripts.
initramfs and hotplug changes are covered in other specs.
The ltsp-client startscript should move up to the top of rc2.d
Changes in ltsp-build-client are required to remove the unneeded startup scripts:
 * Make a ltsp-services-blacklist file with a list of installed but unneeded services that get installed by default by debootstrap (we should keep the apps around to be able to enable them if needed, see syslogd and ntpdate below as examples).
 * Add code to ltsp-build-client that processes this list, removes the symlinks in rc2.d and sets the S symlinks in rcS.d to K (symlinks are only not restored on upgrade for a runlevel if there still exist any in other runlevels (or if they changed to K for the rcS ones which have no equivalent in other levels)).
Line 63: Line 64:
=== Data preservation and migration === The initramfs and hotplug changes are covered in other specs.
The ltsp-client startscript should move up to the top of rc2.d (S10ltsp-client).
Line 65: Line 67:
Breezy users will either need to rebuild their chroot environment (recommended, since the initramfs/hotplug changes will gain the most speedup) but we could at least provide a script that disables the unneeded services. == Outstanding issues during development ==
Line 67: Line 69:
== Outstanding issues == Examine the initramfs/hotplug speedup that can be done.
Line 69: Line 71:
initramfs/hotplug speedup Examine the gain of the inclusion of readahead-list in the bootprocess (for dapper+1, not explicitly part of this spec).
Line 71: Line 73:
== BoF agenda and discussion == Examining debootstrap for things that dont need to be installed (having a ltsp mode for debootstrap)
----
CategorySpec

Summary

Speed up the Thin Client bootprocess for LTSP

Rationale

Ubuntu 5.10 thin clients take ages to boot. Some of the generic startup time improvements will also apply to thin clients, but we should specifically optimize the thin client startup process as well. Thin clients are usually low-spec hardware and need this more than most.

Use cases

Matthew gives a class on usability at university where he uses LTSP in his class, if he's the first in the class for the day he expects his pupils to be able to work immediately after switching on the Thin clients.

Scope

The boot process of LTSP Thin Clients as well as the default bootstrapping of the thin client chroot environment.

Design

  • Rip out the unneeded services from Thin Clients
  • Fix the delay of nfs mounting in klibc (this seems to be a bug that needs to be tracked)
  • Compare the list of started services between LTSP 4.1 and breezy LTSP
  • Remove the "sleep 3" from the initramfs nfs script (it was for debugging the above klibc timeout and was forgotten to be removed somehow)
  • Start LDM as early as possible in the bootprocess (running it as first service in rc2.d is possible)
  • Find the slowing down part in syslogd (strace) and fix it or remove syslogd completely from the thin client startup unless the user configures a SYSLOG_HOST in lts.conf.
  • Disable ntpdate at boot unless the user explicitly configures an NTP_SERVER in lts.conf, disable the clock in ldm.

Implementation

Cutting down the list of started services in rcS.d on the Thin Client to the following gains us 30 seconds:

  • S02mountvirtfs
  • S04udev
    • (according to UdevRoadmap both being moved to initramfs and being replaced with a "catchup")

  • S32ltsp-client-setup
  • S40hotplug
    • (being removed, replaced by initial boot)
  • S40networking (for spoof protection etc)
  • S50alsa-utils (needed for sound)
  • S70xorg-common

This seems to be the bare minimum of bootscripts. The boot process still needs ~60 seconds from hitting the power button (which includes BIOS indeed) to being able to log in at the login manager (which is about as much as a normal ubuntu workstation installation), mostly caused by initramfs and hotplug which should be sped up by changes Scott will make to the initramfs/hotplug architecture (see UdevRoadmap).

Sadly one slowdown that wont be avoidable is the xorg autodetection, probing the devices takes between 20 and 30 seconds depending on the feedback speed of the hardware.

Code

Changes in ltsp-build-client are required to remove the unneeded startup scripts:

  • Make a ltsp-services-blacklist file with a list of installed but unneeded services that get installed by default by debootstrap (we should keep the apps around to be able to enable them if needed, see syslogd and ntpdate below as examples).
  • Add code to ltsp-build-client that processes this list, removes the symlinks in rc2.d and sets the S symlinks in rcS.d to K (symlinks are only not restored on upgrade for a runlevel if there still exist any in other runlevels (or if they changed to K for the rcS ones which have no equivalent in other levels)).

The initramfs and hotplug changes are covered in other specs. The ltsp-client startscript should move up to the top of rc2.d (S10ltsp-client).

Outstanding issues during development

Examine the initramfs/hotplug speedup that can be done.

Examine the gain of the inclusion of readahead-list in the bootprocess (for dapper+1, not explicitly part of this spec).

Examining debootstrap for things that dont need to be installed (having a ltsp mode for debootstrap)


CategorySpec

ThinClientFasterStartup (last edited 2008-08-06 16:28:01 by localhost)