preload
=======

preload is an adaptive readahead daemon that prefetches files mapped by
applications from the disk to reduce application startup time.  preload should
run on any recent Linux system with /proc pseudo-filesystem mounted.

preload runs as a daemon and gathers information about processes running on
the system and shared-objects that they use.  This information is saved in a
file to keep across runs of preload.

preload is developed at http://preload.sf.net/  Feel free to file bugs, or
join the mailing list.


VERSION
=======

The version number of preload consists of two components, major and minor.
An even minor components means that this a production release of preload,
while odd minor components are alpha releases for testing.  The major
component contains the format of the state file that preload saves on disk.
Upgrades of preload to a higher version with the same major number means that
the saved state will be used by the new version, while if the major number has
been increased, the data in the old state file is unusable and will be
overridden by the new preload.  The only effect of which is that the context
information gathered so far is lost and all started from the beginning.

See the file named NEWS for major changes between releases.


INSTALLATION
============

preload is built and installed using the common ./configure; make; make install
See the file named INSTALL for more details on how to control the directories
that vairous files are installed.

If checked out from CVS, running ./bootstrap is needed before configuring.
To build an RPM package using the distributed spec file, run make rpm.


RUNNING
=======

The easiest way to run preload is by using the provided initscript.  If you
use the RPM package, you should be fine, otherwise you may need to manually
add the service and enable it, by running commands like:

  /sbin/chkconfig --add preload

Let preload run for a couple of boots before expecting it to predict that
much.  Technically, you need to run any application at least two times
before preload starts predicting it.


TROUBLESHOOTING
===============

If you have any problems with getting preload work, try running it from
the command-line.  See `man preload' for available options.  Increase the
verbosity and check out the log file.  If anything seems to be wrong with
preload, do not hesitate to let us know on the mailing list or through the
bug reporting system.


FILES
=====

preload uses the common GNU tools for building and installation, and conforms
to the standards of Fedora Core for distribution-specific practices.  The
following list summarizes files that will be installed and used by preload in
a typical installation, thorough building an RPM from the shipped spec file
for example:

* /usr/sbin/preload:  The daemon.  It forks and runs in background, but that
  behavior as well as files to use can be configured through command-line
  arguments.

* /usr/share/man/man8/preload.8:  Manual page for the daemon.

* /etc/preload.conf:  The configuration file for the daemon.  The syntax is
  simple key-file syntax.  The default configuration file contains all valid
  keys, their description, valid and default values.  A configuration file
  reload can be requested using signals; see the manual for details.  The
  config file used can be changed using command-line options.

* /var/log/preload:  The default log file for the daemon.  The log file used
  can be changed using command-line options.

* /etc/logrotate.d/preload:  logrotate(8) configuration file for the preload
  log file.

* /var/lib/preload/preload.state:  The database of information gathered by
  preload.  This is read during daemon startup and written during daemon
  shutdown and at a repeating rate that is specified in the daemon
  configuration file.  A state save can be requested using signals; see the
  manual for details.  The state file used can be changed using command-line
  options.

* /etc/rc.d/init.d/preload:  SysV-style init-script for launching the daemon.

* /etc/sysconfig/preload:  Configuration file for the init-script launcher.
  Contains parameters that decide whether preload should be launched, based on
  the current system configuration (available memory, etc), and command-line
  arguments that should be passed to the daemon.

================================================================================


1 September 2005
Behdad Esfahbod
http://behdad.org/
