Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-2939

Make rootfs updates faster by reading content before writing content

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Days in progress:
      20

      Description

      The background is that delta updates are faster because they read a lot, and only write the changed parts. We can do the same in rootfs updates one block at a time. Quick experiments with SD cards revealed ~3x reading speed when compared to writing speed.

      Acceptance criteria:

      • Mender client must do, block by block:
        1. Read the block
        2. Compare the contents of the block with the block from the rootfs update stream
        3. If (and only if) different, seek back to the beginning of the block and write that block from the update stream
        4. Proceed to next block
      • The Sync() call must only performed on written blocks
      • Must never read further than the length of the update stream (so the stream must be read first)
      • Stretch goal: Enable for UBI writing as well
        • This is likely more complicated because UBI requires an exact number of bytes to be written to be known beforehand, and that is not possibly for rootfs updates. See also this comment.
      • No test is needed, since updates are already extensively tested, but a quick manual verification of the speed improvement would be good

        Attachments

          Activity

            People

            • Assignee:
              oleorhagen Ole Petter Orhagen
              Reporter:
              a10040 Kristian Amlie
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel