Subject: Fasttrack for turbo-charging SVr4 package install. [PSARC/2009/173 FastTrack timeout 03/18/2009] To: PSARC@sac.sfbay Cc: Casper.Dik@Sun.COM Bcc: one-pager-list@sac.sfbay one-pager-log@sac.sfbay sac-bar@sac.sfbay Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI Copyright 2009 Sun Microsystems, Inc. 1. Introduction 1.1. Project/Component Working Name: Fasttrack for turbo-charging SVr4 package install. 1.2. Name of Document Author/Supplier: Author: Casper Dik 1.3 Date of This Document: 12 March, 2009 4. Technical Description Fasttrack for turbo-charging SVr4 package install. Release binding: patch/micro Our customers using Solaris 10 have several problems: - installing patches is slow - liveupgrade is slow - upgrade is slow - liveupgrade with zones is even slower. - installing zones is slow Much of this is caused by the contents database /var/sadm/install/contents. Most of the procedures listed above cause around 50-150GB of I/O to the contents file. Earlier attempts to get rid of the file didn't pan out. This project proposes to keep the contents file but delay writing it. The contents file is managed by a daemon. Package commands no longer manipulate the contents file themselves, they call the daemon. The pkgserv daemon stores all modifications in a logfile (/var/sadm/install/pkglog). The "virtual contents file" is the on-disk "contents" file and the on-disk "pkglog" file. The daemon will lock out older versions of the package commands by grabbing the contents lock file. (Older package commands can run again after the daemon has exited) The fasttrack adds the following commands/subcommands: /usr/sadm/install/bin/pkgserv - Consolidation private - invoked automatically by the pkgcmds. /usr/bin/pkgadm sync [-R root] [-q] Writes the contents file and rolls the contents log file. Optionally forces the contents file server to quit [-q]. - invoked automatically by the pkgcmds, lu commands (such as luumount), install, upgrade, liveupgrade, zoneadm install /var/svc/manifest/system/pkgserv.xml - defines svc:/system/pkgserv:default - runs "pkgadm sync -q" at boot and shutdown time. - write the contents file if needed, picks up the pieces if pkgserv is killed, makes sure the pkgserv exits. The new implementation uses at most as much memory (both real and reserved) as the current implementation, but typically less. Each zone will run its own pkgserv. The daemon will automatically flush the contents file and it will shut down. (By default, the contents file is written within minutes after the last package commands exits) The performance change is considerable: install 25-50% (1 1/3-2 as fast) upgrade 50-75% (2 - 4 times faster) liveupgrade 50-75% (w/ or w/o zones) (higher gain with more zones) zone install 50-75% Security: the daemon verifies the caller's identity using door_ucred(). Users which cannot modify the contents database will run their own read-only version of the daemon. It is possible to back out the new pkgcmds; the contents file stays as before, and after the daemon is stopped, the older package commands can be reinstalled. 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: admininstall 6.5. ARC review type: FastTrack 6.6. ARC Exposure: closed 6.6.1. Rationale: It's about Solaris 10 sustaining (mostly)