chiark / gitweb /
nspawn: add --image= switch to boot GPT disk images that follow the Discoverable...
[elogind.git] / man / systemd-readahead-replay.service.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2010 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd-readahead-replay.service" conditional='ENABLE_READAHEAD'
25           xmlns:xi="http://www.w3.org/2001/XInclude">
26
27         <refentryinfo>
28                 <title>systemd-readahead-replay.service</title>
29                 <productname>systemd</productname>
30
31                 <authorgroup>
32                         <author>
33                                 <contrib>Developer</contrib>
34                                 <firstname>Lennart</firstname>
35                                 <surname>Poettering</surname>
36                                 <email>lennart@poettering.net</email>
37                         </author>
38                 </authorgroup>
39         </refentryinfo>
40
41         <refmeta>
42                 <refentrytitle>systemd-readahead-replay.service</refentrytitle>
43                 <manvolnum>8</manvolnum>
44         </refmeta>
45
46         <refnamediv>
47                 <refname>systemd-readahead-replay.service</refname>
48                 <refname>systemd-readahead-collect.service</refname>
49                 <refname>systemd-readahead-done.service</refname>
50                 <refname>systemd-readahead-done.timer</refname>
51                 <refname>systemd-readahead</refname>
52                 <refpurpose>Disk read ahead logic</refpurpose>
53         </refnamediv>
54
55         <refsynopsisdiv>
56                 <para><filename>systemd-readahead-replay.service</filename></para>
57                 <para><filename>systemd-readahead-collect.service</filename></para>
58                 <para><filename>systemd-readahead-done.service</filename></para>
59                 <para><filename>systemd-readahead-done.timer</filename></para>
60                 <cmdsynopsis>
61                         <command>/usr/lib/systemd/systemd-readahead/systemd-readahead</command>
62                         <arg choice="opt" rep="repeat">OPTIONS</arg>
63                         <arg choice="plain">COMMAND</arg>
64                         <arg choice="opt">DIRECTORY | FILE</arg>
65                 </cmdsynopsis>
66         </refsynopsisdiv>
67
68         <refsect1>
69                 <title>Description</title>
70
71                 <para><filename>systemd-readahead-collect.service</filename>
72                 is a service that collects disk usage patterns at boot
73                 time. <filename>systemd-readahead-replay.service</filename>
74                 is a service that replays this access data collected
75                 at the subsequent boot. Since disks tend to be
76                 magnitudes slower than RAM, this is intended to improve
77                 boot speeds by pre-loading early at boot all data on
78                 disk that is known to be read for the complete boot
79                 process.</para>
80
81                 <para><filename>systemd-readahead-done.service</filename>
82                 is executed a short while after boot completed and signals
83                 <filename>systemd-readahead-collect.service</filename>
84                 to end data collection. On this signal, this service
85                 will then sort the collected disk accesses and store
86                 information about them in
87                 <filename>/.readahead</filename>.</para>
88
89                 <para>Normally, both
90                 <filename>systemd-readahead-collect.service</filename>
91                 and
92                 <filename>systemd-readahead-replay.service</filename>
93                 are activated at boot so that access patterns from the
94                 preceding boot are replayed and new data collected
95                 for the subsequent boot. However, on read-only media
96                 where the collected data cannot be stored, it might
97                 be a good idea to disable
98                 <filename>systemd-readahead-collect.service</filename>.</para>
99
100                 <para>On rotating media, when replaying disk accesses
101                 at early boot,
102                 <filename>systemd-readahead-replay.service</filename>
103                 will order read requests by their location on disk. On
104                 non-rotating media, they will be ordered by their
105                 original access timestamp. If the file system supports
106                 it,
107                 <filename>systemd-readahead-collect.service</filename>
108                 will also defragment and rearrange files on disk to
109                 optimize subsequent boot times.</para>
110         </refsect1>
111
112         <refsect1>
113                 <title>Options</title>
114
115                 <para><filename>systemd-readahead</filename> understands
116                 the following options:</para>
117
118                 <variablelist>
119                         <varlistentry>
120                                 <term><option>--max-files=</option></term>
121
122                                 <listitem><para>Maximum number of
123                                 files to read ahead. Only valid
124                                 for thes <command>collect</command>
125                                 command.</para></listitem>
126                         </varlistentry>
127
128                         <varlistentry>
129                                 <term><option>--file-size-max=</option></term>
130
131                                 <listitem><para>Maximum size of files
132                                 in bytes to read ahead. Only valid
133                                 for the <command>collect</command>
134                                 and <command>replay</command>
135                                 commands.</para></listitem>
136                         </varlistentry>
137
138                         <varlistentry>
139                                 <term><option>--timeout=</option></term>
140
141                                 <listitem><para>Maximum time in microseconds
142                                 to spend collecting data. Only valid
143                                 for the <command>collect</command>
144                                 command.</para></listitem>
145                         </varlistentry>
146
147                         <xi:include href="standard-options.xml" xpointer="help" />
148                         <xi:include href="standard-options.xml" xpointer="version" />
149                 </variablelist>
150
151         </refsect1>
152
153         <refsect1>
154                 <title>Commands</title>
155
156                 <para>The following commands are understood by
157                 <filename>systemd-readahead</filename>:</para> <variablelist>
158                         <varlistentry>
159                                 <term><command>collect
160                                 [<replaceable>DIRECTORY</replaceable>]</command></term>
161                                 <listitem>
162                                         <para>Collect read-ahead data on
163                                         early boot. When terminating, it will
164                                         write out a pack file to the indicated
165                                         directory containing the read-ahead
166                                         data. </para>
167                                 </listitem>
168                         </varlistentry>
169
170                         <varlistentry>
171                                 <term><command>replay
172                                 [<replaceable>DIRECTORY</replaceable>]</command></term>
173                                 <listitem>
174                                         <para>Perform read-ahead on the
175                                         specified directory tree.</para>
176                                 </listitem>
177                         </varlistentry>
178
179                         <varlistentry>
180                                 <term><command>analyze
181                                 [<replaceable>FILE</replaceable>]</command></term>
182                                 <listitem>
183                                         <para>Dumps the content of the
184                                         read-ahead pack file to the
185                                         terminal. For each file, the
186                                         output lists approximately how
187                                         much will be read ahead by
188                                         the <command>replay</command>
189                                         command.</para>
190                                 </listitem>
191                         </varlistentry>
192
193                 </variablelist>
194         </refsect1>
195
196         <refsect1>
197                 <title>See Also</title>
198                 <para>
199                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
200                 </para>
201         </refsect1>
202
203 </refentry>