By Liane Praza on Mar 16, 2009
Steve Peng has done something really cool. He's taken the slowest part of the first-boot experience and made it many \*times\* faster than it was. This happened quite a while ago in Nevada/OpenSolaris, so lots of folks have probably already noticed, but I wanted to take a few moments and call it out explicitly.
In onnv_84 (in February, 2008), Steve integrated the fix for
6351623 Initial manifest-import is slow
During the first boot of Solaris, SMF doesn't know yet what manifests have been populated on the system, so it imports everything below
/var/svc/manifest. On systems with slow disks, this can take a long while, but generally folks are used to (and frustrated about!) seeing the slow progress of:
Loading smf(5) service descriptions: 36/189
During that time, SMF is carefully taking all the manifests from
/var/svc/manifest and committing the data to persistent storage. Which takes a while because we weren't doing a bulk import, and instead doing every single property update as a separate transaction to sqlite, each of which needed to commit to disk, which can be very slow.
Steve changed things to instead do the import into
tmpfs, where commits are fast because they go to memory rather than all the way to disk, and then switch the repository back to using persistent storage after the imports have completed.
This is a huge deal for performance of the manifest-import service. It significantly improves performance for the first boot after install, for the first boot of virtualized (zones, XVM, VirtualBox, etc.) deployments, and on system upgrades.
In a quick and dirty test on a bare-metal Solaris install, I found manifest-import was 3.15 times faster at importing the ~189 manifests currently included with SXDE. Steve's seen even better performance on many machines -- more like 6.6 times faster!
For those deploying diskless clients, the change in first-boot performance should be nothing less of remarkable.