About boot time optimization in Linux
I disagree partially with this statement: The thing that should be talked instead should be linearizing, i.e. making sure that related files (not one, files) are one contiguous area of the disk
. This is lifted off Lubos Lunak's blog post about defragmenting on Linux.
The first areas that should be looked (in this order) into:
- Reduce the amount of files loaded upon app startup.
- Reduce footprint of loaded files on disk. That is, reduce size on disk.
- Increment the amount of shareable data, whether it's libraries, icons or other data.
- Reduce the amount of work the dynamic loader has to do when loading an application. Prelink or kdeinit help, but they're domain-specific. We need a more general solution that applies to all applications. E.g., the ideal number of relocations should be 0.
- Preload the resident set upon boot.
- Disk caching the resident set as a contiguous block on disk. This measure should be looked upon as a last resort, sort of what Mac OS X does. This of course entails issues with software upgrades and the like.
Changing on-disk layout should be reserved as a last-resource measure, because it means you have to dig deep into the core system structure, which of course isn't exactly a shareable optimization among Unices, and because it might bring more fragility to an already extremely interdependent system.
All those changes are small time-savers that add up big time. Plus, those all tend to reduce disk head seek and thus startup time.