ThinClientFasterStartup

Differences between revisions 14 and 15
Revision 14 as of 2005-11-05 17:44:43
Size: 5085
Editor: 209
Comment: and more comments from me
Revision 15 as of 2005-11-24 13:26:49
Size: 4220
Editor: p5089C939
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 32: Line 32:
 * Fix the delay of nfs mounting in klibc
'''ScottJamesRemnant: do you have any idea why this happens? If so, please document it here for other people -- if not please explicitly say you need to investigate it rather than just fix it.'''
 * Fix the delay of nfs mounting in klibc (this seems to be a bug that needs to be tracked)
Line 35: Line 34:
 * Remove the "sleep 3" from the initramfs nfs script
'''ScottJamesRemnant: this sleep is usually needed, it's not just there for fun. Please indicate that you have researched why this is there, and that it is safe to remove.'''
 * start LDM as early as possible in the bootprocess
'''ScottJamesRemnant: please document its dependencies, so somebody else can evaluate how early it can be.'''
 * find the slowing down part in syslogd (strace) and fix it
'''ScottJamesRemnant: do you have any idea why this happens? If so, please document it here for other people -- if not please explicitly say it needs to be investigated.'''
 * run a ntpd on the ltsp server and make the thin client pull its time from there

'''MattZimmerman: better to disable ntpdate at boot unless the user explicitly configures an NTP server in lts.conf, rather than adding a new default service to the server. Most installations probably don't care if the clock on the thin clients is accurate.'''

 * 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
'''ScottJamesRemnant: err... depmod and udev kinda need that'''
 * 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 56: Line 45:
'''ScottJamesRemnant: both being moved to initramfs and being replaced with a "catchup"'''   (according to UdevRoadmap both being moved to initramfs and being replaced with a "catchup")
Line 59: Line 48:
'''ScottJamesRemnant: being removed, replaced by initial boot'''
 * S40networking
'''ScottJamesRemnant:
do you want this, or Network Manager on the clients?'''
 * S50alsa-utils
  (being removed, replaced by initial boot)
 * S40networking (for spoof protection etc)
 * S50alsa-utils (needed for sound)
Line 66: 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). 
Line 68: Line 56:
'''MattZimmerman: doesn't describe how these changes will be implemented (omitting packages via debootstrap, removing symlinks in ltsp-client-setup, a mixture of the two?''' 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 72: 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 with update-rc.d remove.
 * Make ltsp-client export LTSP_CLIENT and make sure ntpd and syslogd are started after ltsp-client
  * Make changes to the initscripts of syslogd and ntpdate to die immediately if LTSP_CLIENT is set, but NTP_SERVER/SYSLOG_HOST is not set.
 * Make ltsp-client respect NTP_SERVER as well as SYSLOG_HOST (the latter is already implemented in pere's branch)
Line 74: Line 68:
The ltsp-client startscript should move up to the top of rc2.d
Giving readahead-list a list of files to preload on boot.

'''MattZimmerman: readahead is tricky, since it may hurt more than it helps if the client hasn't much memory. I suggest this not be part of the initial implementation, and that careful measurements be made before enabling it by default. We can consider it as a future optimization, perhaps an optional one enabled in lts.conf.'''

=== 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 87: Line 74:
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).

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 with update-rc.d remove.
  • Make ltsp-client export LTSP_CLIENT and make sure ntpd and syslogd are started after ltsp-client
    • Make changes to the initscripts of syslogd and ntpdate to die immediately if LTSP_CLIENT is set, but NTP_SERVER/SYSLOG_HOST is not set.
  • Make ltsp-client respect NTP_SERVER as well as SYSLOG_HOST (the latter is already implemented in pere's branch)

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)

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