Hi Aditha,
On 03.09.24 11:09, Adithya Balakumar wrote:
> Hi All,
>
> I am trying to understand the variation in the delta size when rdiff and
> zchunk.
> To explain what I have tried, I created a delta of 2 image (img1 ->
> img2) files with rdiff. The size of the delta file was 94 MB.
>
> Then I tried updating img1 to img2 with the delta handler (zchunk),
> where the total chunks downloaded amounted to about 96 MB.
>
This does not tell a lot. The use case of rsync and zchunk is very
different.
With rsync, you know exactly which version is on all of your devices in
field, and you supply a delta in rsync format for exactly this version.
With zchunk, the delta is computed by the device - you do not need to
know which version is running on the device, and Zchunk and suitable for
a delta update from any version to any version. In worst case, zchunk
will download the whole compresseed image. With rsync, the delta can be
bigger than the original image.
> So atleast in the given scenario that I am trying, there isn't too much
> difference between the delta size when using rdiff or zchunk.
Scenario is different.
>
> However, I came across this information about rdiff that I quote below
> from the Delta update documentation in swupdate docs[1]
> "/It gives the best results in terms of reduced size when differences
> are very small, but the differential output tends to be very large as
> soon as the differences are meaningful. Differential images created for
> SWUpdate show that, as soon as the difference larger is, the resulting
> delta image can even become larger as the original one./"
>
It seems very clear.
> So, I would like to understand if there is any threshold or a sweet spot
> where the delta generated by rdiff can be larger when compared to the
> total size of chunks downloaded by zchunk.
It depends on your image and your project. You cannot easy find a threshold.
>
> [1]
https://sbabic.github.io/swupdate/delta-update.html#librsync
>
Best regards,
Stefano Babic