systemd-readahead-collect.service.html 8.99 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-readahead-replay.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
22
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd-readahead-replay.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-readahead-replay.service, systemd-readahead-collect.service, systemd-readahead-done.service, systemd-readahead-done.timer, systemd-readahead — Disk read ahead logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-readahead-replay.service</code></p><p><code class="filename">systemd-readahead-collect.service</code></p><p><code class="filename">systemd-readahead-done.service</code></p><p><code class="filename">systemd-readahead-done.timer</code></p><div class="cmdsynopsis"><p><code class="command">/usr/lib/systemd/systemd-readahead/systemd-readahead</code>  [OPTIONS...]  COMMAND  [DIRECTORY | FILE]</p></div></div><div class="refsect1"><a name="idm214193075936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">systemd-readahead-collect.service</code>
23 24 25 26
                is a service that collects disk usage patterns at boot
                time. <code class="filename">systemd-readahead-replay.service</code>
                is a service that replays this access data collected
                at the subsequent boot. Since disks tend to be
27
                magnitudes slower than RAM, this is intended to improve
28 29 30 31 32
                boot speeds by pre-loading early at boot all data on
                disk that is known to be read for the complete boot
                process.</p><p><code class="filename">systemd-readahead-done.service</code>
                is executed a short while after boot completed and signals
                <code class="filename">systemd-readahead-collect.service</code>
33
                to end data collection. On this signal, this service
34
                will then sort the collected disk accesses and store
35
                information about them in
36 37 38 39 40 41 42
                <code class="filename">/.readahead</code>.</p><p>Normally, both
                <code class="filename">systemd-readahead-collect.service</code>
                and
                <code class="filename">systemd-readahead-replay.service</code>
                are activated at boot so that access patterns from the
                preceding boot are replayed and new data collected
                for the subsequent boot. However, on read-only media
43
                where the collected data cannot be stored, it might
44 45
                be a good idea to disable
                <code class="filename">systemd-readahead-collect.service</code>.</p><p>On rotating media, when replaying disk accesses
46
                at early boot,
47 48 49 50
                <code class="filename">systemd-readahead-replay.service</code>
                will order read requests by their location on disk. On
                non-rotating media, they will be ordered by their
                original access timestamp. If the file system supports
51
                it,
52 53
                <code class="filename">systemd-readahead-collect.service</code>
                will also defragment and rearrange files on disk to
54
                optimize subsequent boot times.</p></div><div class="refsect1"><a name="idm214197017776"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p><code class="filename">systemd-readahead</code> understands
55
                the following options:</p><div class="variablelist"><dl class="variablelist"><dt id="--files-max="><span class="term"><code class="option">--files-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--files-max="></a></dt><dd><p>Maximum number of
56 57 58
                                files to read ahead. Only valid
                                for thes <span class="command"><strong>collect</strong></span>
                                command.</p></dd><dt id="--file-size-max="><span class="term"><code class="option">--file-size-max=</code></span><a class="headerlink" title="Permalink to this term" href="#--file-size-max="></a></dt><dd><p>Maximum size of files
59
                                in bytes to read ahead. Only valid
60 61
                                for the <span class="command"><strong>collect</strong></span>
                                and <span class="command"><strong>replay</strong></span>
62 63
                                commands.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout="></a></dt><dd><p>Maximum time in microseconds
                                to spend collecting data. Only valid
64
                                for the <span class="command"><strong>collect</strong></span>
65
                                command.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
66
    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm214197006432"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands"></a></h2><p>The following commands are understood by
67 68 69
                <code class="filename">systemd-readahead</code>:</p><div class="variablelist"><dl class="variablelist"><dt id="collect
                                [DIRECTORY]"><span class="term"><span class="command"><strong>collect
                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#collect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D"></a></dt><dd><p>Collect read-ahead data on
70
                                        early boot. When terminating, it will
71 72 73 74 75 76 77 78 79
                                        write out a pack file to the indicated
                                        directory containing the read-ahead
                                        data. </p></dd><dt id="replay
                                [DIRECTORY]"><span class="term"><span class="command"><strong>replay
                                [<em class="replaceable"><code>DIRECTORY</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#replay%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BDIRECTORY%5D"></a></dt><dd><p>Perform read-ahead on the
                                        specified directory tree.</p></dd><dt id="analyze
                                [FILE]"><span class="term"><span class="command"><strong>analyze
                                [<em class="replaceable"><code>FILE</code></em>]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#analyze%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFILE%5D"></a></dt><dd><p>Dumps the content of the
                                        read-ahead pack file to the
80 81 82
                                        terminal. For each file, the
                                        output lists approximately how
                                        much will be read ahead by
83
                                        the <span class="command"><strong>replay</strong></span>
84
                                        command.</p></dd></dl></div></div><div class="refsect1"><a name="idm214196988320"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
85 86
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                </p></div></div></body></html>