chiark / gitweb /
man: drop references to "cgroup" wher appropriate
[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>--max-files=</option></term>
128
129                                 <listitem><para>Maximum number of
130                                 files to read ahead. Only valid
131                                 for thes <command>collect</command>
132                                 command.</para></listitem>
133                         </varlistentry>
134
135                         <varlistentry>
136                                 <term><option>--file-size-max=</option></term>
137
138                                 <listitem><para>Maximum size of files
139                                 in bytes to read ahead. Only valid
140                                 for the <command>collect</command>
141                                 and <command>replay</command>
142                                 commands.</para></listitem>
143                         </varlistentry>
144
145                         <varlistentry>
146                                 <term><option>--timeout=</option></term>
147
148                                 <listitem><para>Maximum time in microseconds
149                                 to spend collecting data. Only valid
150                                 for the <command>collect</command>
151                                 command.</para></listitem>
152                         </varlistentry>
153                 </variablelist>
154
155         </refsect1>
156
157         <refsect1>
158                 <title>Commands</title>
159
160                 <para>The following commands are understood by
161                 <filename>systemd-readahead</filename>:</para> <variablelist>
162                         <varlistentry>
163                                 <term><command>collect
164                                 [<replaceable>DIRECTORY</replaceable>]</command></term>
165                                 <listitem>
166                                         <para>Collect read-ahead data on
167                                         early boot. When terminating, it will
168                                         write out a pack file to the indicated
169                                         directory containing the read-ahead
170                                         data. </para>
171                                 </listitem>
172                         </varlistentry>
173
174                         <varlistentry>
175                                 <term><command>replay
176                                 [<replaceable>DIRECTORY</replaceable>]</command></term>
177                                 <listitem>
178                                         <para>Perform read-ahead on the
179                                         specified directory tree.</para>
180                                 </listitem>
181                         </varlistentry>
182
183                         <varlistentry>
184                                 <term><command>analyze
185                                 [<replaceable>FILE</replaceable>]</command></term>
186                                 <listitem>
187                                         <para>Dumps the content of the
188                                         read-ahead pack file to the
189                                         terminal. For each file, the
190                                         output lists approximately how
191                                         much will be read ahead by
192                                         the <command>replay</command>
193                                         command.</para>
194                                 </listitem>
195                         </varlistentry>
196
197                 </variablelist>
198         </refsect1>
199
200         <refsect1>
201                 <title>See Also</title>
202                 <para>
203                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
204                 </para>
205         </refsect1>
206
207 </refentry>