chiark / gitweb /
man: update sd_bus_request_name() man page
[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
26         <refentryinfo>
27                 <title>systemd-readahead-replay.service</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd-readahead-replay.service</refentrytitle>
42                 <manvolnum>8</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd-readahead-replay.service</refname>
47                 <refname>systemd-readahead-collect.service</refname>
48                 <refname>systemd-readahead-done.service</refname>
49                 <refname>systemd-readahead-done.timer</refname>
50                 <refname>systemd-readahead</refname>
51                 <refpurpose>Disk read ahead logic</refpurpose>
52         </refnamediv>
53
54         <refsynopsisdiv>
55                 <para><filename>systemd-readahead-replay.service</filename></para>
56                 <para><filename>systemd-readahead-collect.service</filename></para>
57                 <para><filename>systemd-readahead-done.service</filename></para>
58                 <para><filename>systemd-readahead-done.timer</filename></para>
59                 <cmdsynopsis>
60                         <command>/usr/lib/systemd/systemd-readahead/systemd-readahead</command>
61                         <arg choice="opt" rep="repeat">OPTIONS</arg>
62                         <arg choice="plain">COMMAND</arg>
63                         <arg choice="opt">DIRECTORY | FILE</arg>
64                 </cmdsynopsis>
65         </refsynopsisdiv>
66
67         <refsect1>
68                 <title>Description</title>
69
70                 <para><filename>systemd-readahead-collect.service</filename>
71                 is a service that collects disk usage patterns at boot
72                 time. <filename>systemd-readahead-replay.service</filename>
73                 is a service that replays this access data collected
74                 at the subsequent boot. Since disks tend to be
75                 magnitudes slower than RAM, this is intended to improve
76                 boot speeds by pre-loading early at boot all data on
77                 disk that is known to be read for the complete boot
78                 process.</para>
79
80                 <para><filename>systemd-readahead-done.service</filename>
81                 is executed a short while after boot completed and signals
82                 <filename>systemd-readahead-collect.service</filename>
83                 to end data collection. On this signal, this service
84                 will then sort the collected disk accesses and store
85                 information about them in
86                 <filename>/.readahead</filename>.</para>
87
88                 <para>Normally, both
89                 <filename>systemd-readahead-collect.service</filename>
90                 and
91                 <filename>systemd-readahead-replay.service</filename>
92                 are activated at boot so that access patterns from the
93                 preceding boot are replayed and new data collected
94                 for the subsequent boot. However, on read-only media
95                 where the collected data cannot be stored, it might
96                 be a good idea to disable
97                 <filename>systemd-readahead-collect.service</filename>.</para>
98
99                 <para>On rotating media, when replaying disk accesses
100                 at early boot,
101                 <filename>systemd-readahead-replay.service</filename>
102                 will order read requests by their location on disk. On
103                 non-rotating media, they will be ordered by their
104                 original access timestamp. If the file system supports
105                 it,
106                 <filename>systemd-readahead-collect.service</filename>
107                 will also defragment and rearrange files on disk to
108                 optimize subsequent boot times.</para>
109         </refsect1>
110
111         <refsect1>
112                 <title>Options</title>
113
114                 <para><filename>systemd-readahead</filename> understands
115                 the following options:</para>
116
117                 <variablelist>
118                         <varlistentry>
119                                 <term><option>-h</option></term>
120                                 <term><option>--help</option></term>
121
122                                 <listitem><para>Prints a short help text
123                                 and exits.</para></listitem>
124                         </varlistentry>
125
126                         <varlistentry>
127                                 <term><option>--version</option></term>
128
129                                 <listitem><para>Prints a short version
130                                 string and exits.</para></listitem>
131                         </varlistentry>
132
133                         <varlistentry>
134                                 <term><option>--max-files=</option></term>
135
136                                 <listitem><para>Maximum number of
137                                 files to read ahead. Only valid
138                                 for thes <command>collect</command>
139                                 command.</para></listitem>
140                         </varlistentry>
141
142                         <varlistentry>
143                                 <term><option>--file-size-max=</option></term>
144
145                                 <listitem><para>Maximum size of files
146                                 in bytes to read ahead. Only valid
147                                 for the <command>collect</command>
148                                 and <command>replay</command>
149                                 commands.</para></listitem>
150                         </varlistentry>
151
152                         <varlistentry>
153                                 <term><option>--timeout=</option></term>
154
155                                 <listitem><para>Maximum time in microseconds
156                                 to spend collecting data. Only valid
157                                 for the <command>collect</command>
158                                 command.</para></listitem>
159                         </varlistentry>
160                 </variablelist>
161
162         </refsect1>
163
164         <refsect1>
165                 <title>Commands</title>
166
167                 <para>The following commands are understood by
168                 <filename>systemd-readahead</filename>:</para> <variablelist>
169                         <varlistentry>
170                                 <term><command>collect
171                                 [<replaceable>DIRECTORY</replaceable>]</command></term>
172                                 <listitem>
173                                         <para>Collect read-ahead data on
174                                         early boot. When terminating, it will
175                                         write out a pack file to the indicated
176                                         directory containing the read-ahead
177                                         data. </para>
178                                 </listitem>
179                         </varlistentry>
180
181                         <varlistentry>
182                                 <term><command>replay
183                                 [<replaceable>DIRECTORY</replaceable>]</command></term>
184                                 <listitem>
185                                         <para>Perform read-ahead on the
186                                         specified directory tree.</para>
187                                 </listitem>
188                         </varlistentry>
189
190                         <varlistentry>
191                                 <term><command>analyze
192                                 [<replaceable>FILE</replaceable>]</command></term>
193                                 <listitem>
194                                         <para>Dumps the content of the
195                                         read-ahead pack file to the
196                                         terminal. For each file, the
197                                         output lists approximately how
198                                         much will be read ahead by
199                                         the <command>replay</command>
200                                         command.</para>
201                                 </listitem>
202                         </varlistentry>
203
204                 </variablelist>
205         </refsect1>
206
207         <refsect1>
208                 <title>See Also</title>
209                 <para>
210                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
211                 </para>
212         </refsect1>
213
214 </refentry>