All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator
@ 2026-10-07 14:58 peacherwu
  2026-10-07 15:25 ` Gao Xiang
  0 siblings, 1 reply; 5+ messages in thread
From: peacherwu @ 2026-10-07 14:58 UTC (permalink / raw)
  To: linux-erofs; +Cc: hsiangkao, chao

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

Hi,

I'd like to share results of an alternative OTA delta generator/applier
for EROFS partition images.

AceDelta diffs whole EROFS partitions (system, vendor, odm, my_* etc.) at
file level, recompressing lz4 clusters on apply. Compared with AOSP 17
delta_generator (minor_version 10, -enable_lz4diff)
on seven real consecutive-build pairs from five phones:

  Device / builds                    AOSP MB  AceDelta MB  Reduction
  OnePlus 15      A.22 -> A.27        1152.6      683.7      40.7%
  OPPO Find X8 Pro C.76 -> C.79       1059.1      733.1      30.8%
  Xiaomi 15 Pro   2.0.105 -> 2.0.214  1038.6      655.6      36.9%
  Xiaomi 15 Pro   3.0.3 -> 3.0.7       833.4      490.4      41.2%
  Xiaomi 15 Pro   2.0.214 -> 3.0.3    2657.9     1685.8      36.6%
  Nubia Z80 Ultra 16.0.12 -> 16.0.16   767.9      514.7      33.0%
  Realme GT8 Pro  A.68 -> A.71        1268.9      878.1      30.8%

Generation is ~2.5x faster than delta_generator; apply time (on PC) is
about the same (single-thread 8% slower, multi-thread 20% faster using more
RAM). Hash tree and FEC are
regenerated at apply time by my own implementations. Detailed info, plus
Linux evaluation binaries:

  https://github.com/peacherwu969/acedelta

A question for EROFS people. Both AOSP (lz4diff) and AceDelta must
reproduce the lz4 compression exactly; mismatches are patched with small
fixups. Although AceDelta is doing better than AOSP in fixup sizes through
lots of experiments, it's still like shooting in the dark. Is there a more
systematic way that ensures exactness?

Is there an EROFS WeChat group I could join?

Thanks,
--Peacher

[-- Attachment #2: Type: text/html, Size: 1920 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator
  2026-10-07 14:58 [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator peacherwu
@ 2026-10-07 15:25 ` Gao Xiang
  2026-10-07 16:31   ` peacherwu
  0 siblings, 1 reply; 5+ messages in thread
From: Gao Xiang @ 2026-10-07 15:25 UTC (permalink / raw)
  To: peacherwu; +Cc: linux-erofs, hsiangkao, chao, Kelvin Zhang

Hi,

(+cc Kelvin on this topic)

On Wed, Oct 07, 2026 at 10:58:10PM +0800, peacherwu wrote:
> Hi,
> 
> I'd like to share results of an alternative OTA delta generator/applier
> for EROFS partition images.
> 
> AceDelta diffs whole EROFS partitions (system, vendor, odm, my_* etc.) at
> file level, recompressing lz4 clusters on apply. Compared with AOSP 17
> delta_generator (minor_version 10, -enable_lz4diff)
> on seven real consecutive-build pairs from five phones:
> 
>   Device / builds                    AOSP MB  AceDelta MB  Reduction
>   OnePlus 15      A.22 -> A.27        1152.6      683.7      40.7%
>   OPPO Find X8 Pro C.76 -> C.79       1059.1      733.1      30.8%
>   Xiaomi 15 Pro   2.0.105 -> 2.0.214  1038.6      655.6      36.9%
>   Xiaomi 15 Pro   3.0.3 -> 3.0.7       833.4      490.4      41.2%
>   Xiaomi 15 Pro   2.0.214 -> 3.0.3    2657.9     1685.8      36.6%
>   Nubia Z80 Ultra 16.0.12 -> 16.0.16   767.9      514.7      33.0%
>   Realme GT8 Pro  A.68 -> A.71        1268.9      878.1      30.8%
> 
> Generation is ~2.5x faster than delta_generator; apply time (on PC) is
> about the same (single-thread 8% slower, multi-thread 20% faster using more
> RAM). Hash tree and FEC are
> regenerated at apply time by my own implementations. Detailed info, plus
> Linux evaluation binaries:
> 
>   https://github.com/peacherwu969/acedelta

That is a great effort. If you're interested, you could seek
Google Android staffs and see if they are interested.

> 
> A question for EROFS people. Both AOSP (lz4diff) and AceDelta must
> reproduce the lz4 compression exactly; mismatches are patched with small
> fixups. Although AceDelta is doing better than AOSP in fixup sizes through
> lots of experiments, it's still like shooting in the dark. Is there a more
> systematic way that ensures exactness?

I'm not sure if it has a better approach since it relies on a strict
compressed data reproducibility of the compressor.)

> 
> Is there an EROFS WeChat group I could join?

I will message you my own WeChat number privately since I tend to
avoid leaking my contact info publicly.

Thanks,
Gao Xiang

> 
> Thanks,
> --Peacher


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator
  2026-10-07 15:25 ` Gao Xiang
@ 2026-10-07 16:31   ` peacherwu
  2026-10-07 16:57     ` Kelvin Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: peacherwu @ 2026-10-07 16:31 UTC (permalink / raw)
  To: peacherwu, linux-erofs, hsiangkao, chao, Kelvin Zhang

[-- Attachment #1: Type: text/plain, Size: 2774 bytes --]

Hi Gao Xiang, Kelvin,

Thanks. Understood on reproducibility; I'll keep improving the matcher
empirically.

Kelvin: most of the size gain comes from closer internal file pair
diff-ing, plus a solid LZMA stream, which is why the applier RSS is bounded
by a window (530 MB). If you'd like to reproduce on a specific pair, I can
point at the public OTA zips.

Thanks,
--Peacher

On Wed, Oct 7, 2026 at 11:25 PM Gao Xiang <xiang@kernel.org> wrote:

> Hi,
>
> (+cc Kelvin on this topic)
>
> On Wed, Oct 07, 2026 at 10:58:10PM +0800, peacherwu wrote:
> > Hi,
> >
> > I'd like to share results of an alternative OTA delta generator/applier
> > for EROFS partition images.
> >
> > AceDelta diffs whole EROFS partitions (system, vendor, odm, my_* etc.) at
> > file level, recompressing lz4 clusters on apply. Compared with AOSP 17
> > delta_generator (minor_version 10, -enable_lz4diff)
> > on seven real consecutive-build pairs from five phones:
> >
> >   Device / builds                    AOSP MB  AceDelta MB  Reduction
> >   OnePlus 15      A.22 -> A.27        1152.6      683.7      40.7%
> >   OPPO Find X8 Pro C.76 -> C.79       1059.1      733.1      30.8%
> >   Xiaomi 15 Pro   2.0.105 -> 2.0.214  1038.6      655.6      36.9%
> >   Xiaomi 15 Pro   3.0.3 -> 3.0.7       833.4      490.4      41.2%
> >   Xiaomi 15 Pro   2.0.214 -> 3.0.3    2657.9     1685.8      36.6%
> >   Nubia Z80 Ultra 16.0.12 -> 16.0.16   767.9      514.7      33.0%
> >   Realme GT8 Pro  A.68 -> A.71        1268.9      878.1      30.8%
> >
> > Generation is ~2.5x faster than delta_generator; apply time (on PC) is
> > about the same (single-thread 8% slower, multi-thread 20% faster using
> more
> > RAM). Hash tree and FEC are
> > regenerated at apply time by my own implementations. Detailed info, plus
> > Linux evaluation binaries:
> >
> >   https://github.com/peacherwu969/acedelta
>
> That is a great effort. If you're interested, you could seek
> Google Android staffs and see if they are interested.
>
> >
> > A question for EROFS people. Both AOSP (lz4diff) and AceDelta must
> > reproduce the lz4 compression exactly; mismatches are patched with small
> > fixups. Although AceDelta is doing better than AOSP in fixup sizes
> through
> > lots of experiments, it's still like shooting in the dark. Is there a
> more
> > systematic way that ensures exactness?
>
> I'm not sure if it has a better approach since it relies on a strict
> compressed data reproducibility of the compressor.)
>
> >
> > Is there an EROFS WeChat group I could join?
>
> I will message you my own WeChat number privately since I tend to
> avoid leaking my contact info publicly.
>
> Thanks,
> Gao Xiang
>
> >
> > Thanks,
> > --Peacher
>

[-- Attachment #2: Type: text/html, Size: 3544 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator
  2026-10-07 16:31   ` peacherwu
@ 2026-10-07 16:57     ` Kelvin Zhang
  2026-10-08 13:11       ` peacherwu
  0 siblings, 1 reply; 5+ messages in thread
From: Kelvin Zhang @ 2026-10-07 16:57 UTC (permalink / raw)
  To: peacherwu; +Cc: linux-erofs, hsiangkao, chao

[-- Attachment #1: Type: text/plain, Size: 3225 bytes --]

Hi,
    Thanks for raising this to us. We would love to deploy this in AOSP OTA
stack, but in order for AOSP to use AceDiff, we AceDiff must be open source
as we need to put it in AOSP eventually. Is this something you are willing
to do?

On Wed, Oct 7, 2026 at 9:31 AM peacherwu <peacherwu969@gmail.com> wrote:

> Hi Gao Xiang, Kelvin,
>
> Thanks. Understood on reproducibility; I'll keep improving the matcher
> empirically.
>
> Kelvin: most of the size gain comes from closer internal file pair
> diff-ing, plus a solid LZMA stream, which is why the applier RSS is bounded
> by a window (530 MB). If you'd like to reproduce on a specific pair, I can
> point at the public OTA zips.
>
> Thanks,
> --Peacher
>
> On Wed, Oct 7, 2026 at 11:25 PM Gao Xiang <xiang@kernel.org> wrote:
>
>> Hi,
>>
>> (+cc Kelvin on this topic)
>>
>> On Wed, Oct 07, 2026 at 10:58:10PM +0800, peacherwu wrote:
>> > Hi,
>> >
>> > I'd like to share results of an alternative OTA delta generator/applier
>> > for EROFS partition images.
>> >
>> > AceDelta diffs whole EROFS partitions (system, vendor, odm, my_* etc.)
>> at
>> > file level, recompressing lz4 clusters on apply. Compared with AOSP 17
>> > delta_generator (minor_version 10, -enable_lz4diff)
>> > on seven real consecutive-build pairs from five phones:
>> >
>> >   Device / builds                    AOSP MB  AceDelta MB  Reduction
>> >   OnePlus 15      A.22 -> A.27        1152.6      683.7      40.7%
>> >   OPPO Find X8 Pro C.76 -> C.79       1059.1      733.1      30.8%
>> >   Xiaomi 15 Pro   2.0.105 -> 2.0.214  1038.6      655.6      36.9%
>> >   Xiaomi 15 Pro   3.0.3 -> 3.0.7       833.4      490.4      41.2%
>> >   Xiaomi 15 Pro   2.0.214 -> 3.0.3    2657.9     1685.8      36.6%
>> >   Nubia Z80 Ultra 16.0.12 -> 16.0.16   767.9      514.7      33.0%
>> >   Realme GT8 Pro  A.68 -> A.71        1268.9      878.1      30.8%
>> >
>> > Generation is ~2.5x faster than delta_generator; apply time (on PC) is
>> > about the same (single-thread 8% slower, multi-thread 20% faster using
>> more
>> > RAM). Hash tree and FEC are
>> > regenerated at apply time by my own implementations. Detailed info, plus
>> > Linux evaluation binaries:
>> >
>> >   https://github.com/peacherwu969/acedelta
>>
>> That is a great effort. If you're interested, you could seek
>> Google Android staffs and see if they are interested.
>>
>> >
>> > A question for EROFS people. Both AOSP (lz4diff) and AceDelta must
>> > reproduce the lz4 compression exactly; mismatches are patched with small
>> > fixups. Although AceDelta is doing better than AOSP in fixup sizes
>> through
>> > lots of experiments, it's still like shooting in the dark. Is there a
>> more
>> > systematic way that ensures exactness?
>>
>> I'm not sure if it has a better approach since it relies on a strict
>> compressed data reproducibility of the compressor.)
>>
>> >
>> > Is there an EROFS WeChat group I could join?
>>
>> I will message you my own WeChat number privately since I tend to
>> avoid leaking my contact info publicly.
>>
>> Thanks,
>> Gao Xiang
>>
>> >
>> > Thanks,
>> > --Peacher
>>
>

-- 
Sincerely,

Kelvin Zhang

[-- Attachment #2: Type: text/html, Size: 4376 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator
  2026-10-07 16:57     ` Kelvin Zhang
@ 2026-10-08 13:11       ` peacherwu
  0 siblings, 0 replies; 5+ messages in thread
From: peacherwu @ 2026-10-08 13:11 UTC (permalink / raw)
  To: Kelvin Zhang; +Cc: linux-erofs, hsiangkao, chao

[-- Attachment #1: Type: text/plain, Size: 3591 bytes --]

Honestly, I don't have a plan to open source the code yet. Is there a way I
can help? I have removed the `sudo` requirement of the eval binaries...

Thanks,
--Peacher
On Thu, Oct 8, 2026 at 12:57 AM Kelvin Zhang <zhangkelvin@google.com> wrote:

> Hi,
>     Thanks for raising this to us. We would love to deploy this in AOSP
> OTA stack, but in order for AOSP to use AceDiff, we AceDiff must be open
> source as we need to put it in AOSP eventually. Is this something you are
> willing to do?
>
> On Wed, Oct 7, 2026 at 9:31 AM peacherwu <peacherwu969@gmail.com> wrote:
>
>> Hi Gao Xiang, Kelvin,
>>
>> Thanks. Understood on reproducibility; I'll keep improving the matcher
>> empirically.
>>
>> Kelvin: most of the size gain comes from closer internal file pair
>> diff-ing, plus a solid LZMA stream, which is why the applier RSS is bounded
>> by a window (530 MB). If you'd like to reproduce on a specific pair, I can
>> point at the public OTA zips.
>>
>> Thanks,
>> --Peacher
>>
>> On Wed, Oct 7, 2026 at 11:25 PM Gao Xiang <xiang@kernel.org> wrote:
>>
>>> Hi,
>>>
>>> (+cc Kelvin on this topic)
>>>
>>> On Wed, Oct 07, 2026 at 10:58:10PM +0800, peacherwu wrote:
>>> > Hi,
>>> >
>>> > I'd like to share results of an alternative OTA delta generator/applier
>>> > for EROFS partition images.
>>> >
>>> > AceDelta diffs whole EROFS partitions (system, vendor, odm, my_* etc.)
>>> at
>>> > file level, recompressing lz4 clusters on apply. Compared with AOSP 17
>>> > delta_generator (minor_version 10, -enable_lz4diff)
>>> > on seven real consecutive-build pairs from five phones:
>>> >
>>> >   Device / builds                    AOSP MB  AceDelta MB  Reduction
>>> >   OnePlus 15      A.22 -> A.27        1152.6      683.7      40.7%
>>> >   OPPO Find X8 Pro C.76 -> C.79       1059.1      733.1      30.8%
>>> >   Xiaomi 15 Pro   2.0.105 -> 2.0.214  1038.6      655.6      36.9%
>>> >   Xiaomi 15 Pro   3.0.3 -> 3.0.7       833.4      490.4      41.2%
>>> >   Xiaomi 15 Pro   2.0.214 -> 3.0.3    2657.9     1685.8      36.6%
>>> >   Nubia Z80 Ultra 16.0.12 -> 16.0.16   767.9      514.7      33.0%
>>> >   Realme GT8 Pro  A.68 -> A.71        1268.9      878.1      30.8%
>>> >
>>> > Generation is ~2.5x faster than delta_generator; apply time (on PC) is
>>> > about the same (single-thread 8% slower, multi-thread 20% faster using
>>> more
>>> > RAM). Hash tree and FEC are
>>> > regenerated at apply time by my own implementations. Detailed info,
>>> plus
>>> > Linux evaluation binaries:
>>> >
>>> >   https://github.com/peacherwu969/acedelta
>>>
>>> That is a great effort. If you're interested, you could seek
>>> Google Android staffs and see if they are interested.
>>>
>>> >
>>> > A question for EROFS people. Both AOSP (lz4diff) and AceDelta must
>>> > reproduce the lz4 compression exactly; mismatches are patched with
>>> small
>>> > fixups. Although AceDelta is doing better than AOSP in fixup sizes
>>> through
>>> > lots of experiments, it's still like shooting in the dark. Is there a
>>> more
>>> > systematic way that ensures exactness?
>>>
>>> I'm not sure if it has a better approach since it relies on a strict
>>> compressed data reproducibility of the compressor.)
>>>
>>> >
>>> > Is there an EROFS WeChat group I could join?
>>>
>>> I will message you my own WeChat number privately since I tend to
>>> avoid leaking my contact info publicly.
>>>
>>> Thanks,
>>> Gao Xiang
>>>
>>> >
>>> > Thanks,
>>> > --Peacher
>>>
>>
>
> --
> Sincerely,
>
> Kelvin Zhang
>

[-- Attachment #2: Type: text/html, Size: 4970 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-08 13:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 14:58 [RFC] AceDelta: OTA delta for EROFS images, 30-40% smaller than AOSP 17 delta_generator peacherwu
2026-10-07 15:25 ` Gao Xiang
2026-10-07 16:31   ` peacherwu
2026-10-07 16:57     ` Kelvin Zhang
2026-10-08 13:11       ` peacherwu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.