#1054660 debdelta: Improve performance info

Package:
debdelta
Source:
debdelta
Description:
diff and patch utilities which work with Debian packages
Submitter:
Stefan Monnier
Date:
2023-11-01 15:09:03 UTC
Severity:
normal
#1054660#5
Date:
2023-10-27 15:34:02 UTC
From:
To:
Dear Maintainer,

I'm very happily using `debdelta-upgrade` now that I finally heard about
it (I've been using Debian for 20 years and wishing for something like
DebDelta for a big part of it), so first: thanks!

One think that annoys me is that I find the output unclear.  E.g. I see
[note the output was actually in French, so I translated it by hand, it
probably doesn't match 100% what debdelta would say]:

    Created,    time  0.42sec, speed 202kB/sec, avahi-daemon_0.8-12_i386.deb
    [...]
    The delta est too large: libmbim-glib4_1.28.4-2_1.30.0-1_i386.debdelta
    Delta was not created since new package is too small: libmbim-proxy_1.28.4-2_1.30.0-1_i386.debdelta
    [...]
    Created,    time  1.07sec, speed 239kB/sec, libedata-book-1.2-27_3.50.1-1_i386.deb
    [...]
    Downloaded, time  0.11sec, speed  8kB/sec, libudisks2-0_2.10.1-1_2.10.1-2_i386.debdelta
    Downloaded, time  0.24sec, speed 13MB/sec, libreoffice-calc_4%3a7.5.6-1_4%3a7.5.8~rc1-2_i386.debdelta
    [...]
    Downloaded, time  0.02sec, speed 488kB/sec, libmbim-proxy_1.30.0-1_i386.deb
    Downloaded, time  0.03sec, speed 7658kB/sec, libmbim-glib4_1.30.0-1_i386.deb
    [...]
    Created,    time 27.30sec, speed 296kB/sec, libreoffice-calc_4%3a7.5.8~rc1-2_i386.deb
    [...]
    Statistics of delta-upgrade:
       debs result total, size 115MB time 257sec virtual speed 458kB/sec

Questions that I can't answer based on the above output:
- I don't see any other mention of "avahi-daemon" than the "created" line,
  so how was it created?
  [ Could it be due to some previous `debdelta-upgrade` run which
    was maybe interrupted?  I can't remember causing that recently
    enough, tho.  ]
- Why/how were `libmbim-proxy` and `libmbim-glib4` downloaded (since
  there's a delta missing for them) and from where?
  There's no subsequent matching "created" line, so IIUC it was
  downloaded in non-delta form, which I'd expect `debdelta-upgrade`
  never does (leaving it to `apt upgrade` instead).
- The "Downloaded" speed varies very widely (which is admittedly fair
  game, it might just be the result of the state of the network and
  server), and oddly enough I've seen it often higher than my DSL
  connection speed (even for large packages, so it doesn't seem to be
  some kind of rounding error), so it makes me wonder what is it
  exactly measuring.
  Could it be that it's reporting the speed of "virtual bytes"
  (i.e. the number of bytes of the resulting `.deb` after patching,
  rather than the number of bytes of the actual xdelta file)?
- I'd appreciate seeing the actual size of the downloaded data on each
  line (maybe instead of the time?).
- In the final statistics, I'd be interested to see a report comparing
  the amount of bytes that passed over the network compared to the
  number of bytes in the resulting `.deb` files (so as to see how much
  we gained in this).  I'd also be interested to see the average network
  download speed (not virtual) and the average "creation speed" (number
  of `.deb` bytes generated via patching divided by the time it took to
  do it).


        Stefan

#1054660#10
Date:
2023-10-30 07:48:46 UTC
From:
To:
hi

Il 27/10/23 17:34, Stefan Monnier ha scritto:

by default, debdelta-upgrade tries to be smart: for each package that
has to be upgraded,

1)  if there is  a delta, it will download the delta, apply it, and
"create" the new deb
2) if there is no delta, it will "download" the new package (this may be
because, the delta was too big, or the package was too small, or, some
error)
3) after all available deltas have been applied, it may exit, or
continue downloading all needed new .deb

This behavior can be tuned with the option --deb-policy option, see man
page.
by downloading the delta and applying it
from the standard repository of debs
actually, it does
I have no idea
add some -v options

add some -v options

bye

a.

#1054660#15
Date:
2023-11-01 14:57:40 UTC
From:
To:
[..time passes..]

Oh.. could it be that you do it as an optimization: if we're still
applying patches, rather than leave the network unused and since we
can't start `apt` yet, download some of the remaining packages, so the
(presumed) subsequent `apt` will be faster?

But in the output there was no mention of downloading anything related to
that package, whereas most other packages have two lines, one about the
download and one about the creation (in my sample out, this is the case
for `libreoffice-calc`).

I did not expect that behavior.

Duh, can't believe I didn't think of that.
This said, with a `-v` I get more output than what I'd like, but well,
one can't satisfy everyone.


        Stefan