ThinClientFasterStartup

Differences between revisions 11 and 19 (spanning 8 versions)
Revision 11 as of 2005-11-03 22:48:16
Size: 3418
Editor: 221_220_103_66-WIFI_HOTSPOTS
Comment:
Revision 19 as of 2006-02-02 09:43:41
Size: 4114
Editor: 82
Comment:
Deletions are marked like this. Additions are marked like this.
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.

{{{XXX:smurf:Use cases need to be written positively, not in a "list what's broken" style}}}
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 34: 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 36: 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 50: Line 45:
  (according to UdevRoadmap both being moved to initramfs and being replaced with a "catchup")
Line 52: Line 48:
 * S40networking
 * S50alsa-utils
  (being removed, replaced by initial boot)
 * S40networking (for spoof protection etc)
 * S50alsa-utils (needed for sound)
Line 57: Line 54:
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. 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 61: Line 60:
Changes in ltsp-build-client are required to remove the unneeded startup scripts. 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 65:
The ltsp-client startscript should move up to the top of rc2.d
Giving readahead-list a list of files to preload on boot.

=== Data preservation and migration ===

Breezy users will either need to rebuild their chroot environment (recommended, since the initramfs/hotplug changes will yield the most speedup), or we could provide a script that disables the unneeded services.
The ltsp-client startscript should move up to the top of rc2.d (S10ltsp-client).
Line 74: Line 71:
Examine the gain of the inclusion of readahead-list in the bootprocess. Examine the gain of the inclusion of readahead-list in the bootprocess (for dapper+1, not explicitly part of this spec).
Line 77: Line 74:
----
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)