Difference between revisions of "Preload"

From ArchWiki
Jump to: navigation, search
m (l18n)
(+ config path)
 
(28 intermediate revisions by 18 users not shown)
Line 1: Line 1:
 
[[Category:System administration]]
 
[[Category:System administration]]
 +
[[cs:Preload]]
 
[[de:Preload]]
 
[[de:Preload]]
[[cs:Preload]]
+
[[ja:Preload]]
'''preload''' is a program written by Behdad Esfahbod which runs
+
Preloading is the action of putting and keeping target files into the RAM. The benefit is that preloaded applications start more quickly because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore preloading is best used with large and often-used applications like Firefox and LibreOffice.
as a [[daemon]] and records statistics about usage of programs using
+
 
Markov chains; files of more frequently-used programs are, during a
+
== Go-preload ==
computer's spare time, loaded into memory. This results in faster
+
 
startup times as less data needs to be fetched from disk. preload is
+
{{AUR|gopreload-git}} is a small daemon created in the [https://forums.gentoo.org/viewtopic-t-622085-highlight-preload.html Gentoo forum]. To use it, first run this command in a terminal for each program you want to preload at boot:
often paired with [[prelink]].
+
 
 +
# gopreload-prepare ''program''
 +
 
 +
For regular users, take ownership of {{ic|/usr/share/gopreload/enabled}} and {{ic|/usr/share/gopreload/disabled}}
 +
 
 +
# chown username:users /usr/share/gopreload/enabled /usr/share/gopreload/disabled
  
==Installation==
+
and then gopreload each program you want to preload:
preload is available through pacman. In Arch Linux, just issue the command:
 
  
<pre># pacman -S preload</pre>
+
$ gopreload-prepare ''program''
  
==Running the daemon==
+
Then, as instructed, press Enter when the program is fully loaded. This will add a list of files needed by the program in {{ic|/usr/share/gopreload/enabled}}. To load all lists at boot, [[enable]] the systemd service file {{ic|gopreload.service}}.
  
===[[Systemd]]===
+
To disable the loading of a program, remove the appropriate list in {{ic|/usr/share/gopreload/enabled}} or move it to {{ic|/usr/share/gopreload/disabled}}.
  
Start directly with (as root)
+
It is advised to run gopreload-prepare after system upgrades to refresh the file lists.
 +
For the task, the following batch tool come handy:
  
  # systemctl start preload.service
+
  # gopreload-batch-refresh.sh
  
To start preload at system boot, type as root
+
Just let it run without using the system.
  
# systemctl enable preload.service
+
=== Configuration ===
  
===[[rc.conf]] (deprecated)===
+
The configuration file is located in {{ic|/etc/gopreload.conf}}
  
Start directly with
+
== Preload ==
  
<pre># /etc/rc.d/preload start</pre>
+
'''preload''' is a program written by Behdad Esfahbod which runs as a [[daemon]] and records statistics about usage of programs using Markov chains; files of more frequently-used programs are, during a computer's spare time, loaded into memory. This results in faster startup times as less data needs to be fetched from disk.
  
To start preload at system boot, add it to the DAEMONS section in [[rc.conf|/etc/rc.conf]]:
+
=== Installation ===
  
<pre>DAEMONS =(... preload ...)</pre>
+
[[Install]] the {{AUR|preload}} package. You may now [[Daemon|start]] the [[systemd]] service {{ic|preload}}, and/or enable it in order to start at boot.
  
==Configuration==
+
=== Configuration ===
  
The configuration file is <code>/etc/preload.conf</code>, it contains default settings that should be suitable for regular users. The <code>cycle</code> option lets you configure how often to ping the
+
The configuration file is located in {{ic|/etc/preload.conf}}, it contains default settings that should be suitable for regular users. The {{ic|cycle}} option lets you configure how often to ping the
 
preload system to update its model of which applications and libraries to cache.
 
preload system to update its model of which applications and libraries to cache.
  
==See also==
+
== See also ==
* http://en.wikipedia.org/wiki/Preload_(software)
+
 
* http://techthrob.com/2009/03/02/drastically-speed-up-your-linux-system-with-preload/
+
* [[wikipedia:Preload_(software)]]
* [[Readahead]]
+
* [[Improve boot performance]]

Latest revision as of 21:21, 15 May 2018

Preloading is the action of putting and keeping target files into the RAM. The benefit is that preloaded applications start more quickly because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore preloading is best used with large and often-used applications like Firefox and LibreOffice.

Go-preload

gopreload-gitAUR is a small daemon created in the Gentoo forum. To use it, first run this command in a terminal for each program you want to preload at boot:

# gopreload-prepare program

For regular users, take ownership of /usr/share/gopreload/enabled and /usr/share/gopreload/disabled

# chown username:users /usr/share/gopreload/enabled /usr/share/gopreload/disabled

and then gopreload each program you want to preload:

$ gopreload-prepare program

Then, as instructed, press Enter when the program is fully loaded. This will add a list of files needed by the program in /usr/share/gopreload/enabled. To load all lists at boot, enable the systemd service file gopreload.service.

To disable the loading of a program, remove the appropriate list in /usr/share/gopreload/enabled or move it to /usr/share/gopreload/disabled.

It is advised to run gopreload-prepare after system upgrades to refresh the file lists. For the task, the following batch tool come handy:

# gopreload-batch-refresh.sh

Just let it run without using the system.

Configuration

The configuration file is located in /etc/gopreload.conf

Preload

preload is a program written by Behdad Esfahbod which runs as a daemon and records statistics about usage of programs using Markov chains; files of more frequently-used programs are, during a computer's spare time, loaded into memory. This results in faster startup times as less data needs to be fetched from disk.

Installation

Install the preloadAUR package. You may now start the systemd service preload, and/or enable it in order to start at boot.

Configuration

The configuration file is located in /etc/preload.conf, it contains default settings that should be suitable for regular users. The cycle option lets you configure how often to ping the preload system to update its model of which applications and libraries to cache.

See also