<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - systemd-timesyncd: Do not save clock to disk on every NTP fix"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86292">86292</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>systemd-timesyncd: Do not save clock to disk on every NTP fix
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>trivial
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>philipp.reinkemeier@offis.de
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi.
I have a system running with systemd-networkd and systemd-resolved. Main HDD is
an external USB drive. Of course to have a long lifetime of that drive i want
it to spin up as few times as possible. Recently i discovered systemd-timesyncd
and wanted to use that instead of the standard ntp client server
implementation.
However i discovered that systemd-timesyncd saves the current clock value to
disk ("/var/lib/systemd/clock") every time it gets a new NTP fix. It seems this
behavior is introduced by the following commit
<a href="http://cgit.freedesktop.org/systemd/systemd/commit/?id=ece6e766cf89c8ec82ad135969dedf16cd7c1ee8">http://cgit.freedesktop.org/systemd/systemd/commit/?id=ece6e766cf89c8ec82ad135969dedf16cd7c1ee8</a>.
While i see the usefulness of saving the clock to disk and restore it on the
next start of the daemon, i do not understand why this has to happen on every
NTP fix. Isn't it sufficient to save the clock value to disk when the daemon
terminates? This has also been introduced by the commit above. Doing it that
way would prevent unnecessary disk accesses during runtime of the daemon.

To sum up: This is a request to remove the call to "save_clock()" from within
the "manager_adjust_clock(...)" function.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>