Re: Fedora 31 System-Wide Change proposal: Switch RPMs to zstd compression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Jonathan Dieter:

> On Wed, 2019-05-29 at 20:15 -0600, Chris Murphy wrote:
>> 'dnf info deltarpm' says
>> URL          : http://gitorious.org/deltarpm/deltarpm
>> which has an expired certificate, but pushing passed that it says
>> current version 3.6 is 5 years old. Is this really maintained or
>> updatabled?
>
> Upstream has changed to 
> https://github.com/rpm-software-management/deltarpm.  The code is still
> maintained, but there's not much active development.  I can't speak for
> the upstream maintainer, but I would guess that a PR that adds zstd
> support would probably be welcomed.

There's also the matter of increased CPU usage on the client, due to
deltrapm reconstruction.

But I do wonder if we can just stop using deltarpms altogether.  I ran
the script below on three Fedora installations, and I got:

total: count=7 size=1487.4 downloaded=1468.9 savings=18.5 (1.24%)
total: count=45 size=3444.2 downloaded=3360.3 savings=83.9 (2.44%)
total: count=36 size=4115.6 downloaded=3975.3 savings=140.3 (3.41%)

Even when taking into account that the deltarpm metadata needs to be
download as well (at a cost of maybe 10 KiB per update), there are still
real savings, but they are pretty slim.

Thanks,
Florian

#!/usr/bin/python3

# Note: gzip path has not been tested.

import decimal
import glob
import gzip
import re
import sys

RE_DELTARPM = re.compile(
    r'[0-9TZ:-]+ INFO (?:Failed )?Delta RPMs (?:reduced|increased)'
    + r' ([0-9.]+) MB of updates to ([0-9.]+) MB .*')

updates = 0
total_sum = decimal.Decimal()
download_sum = decimal.Decimal()
for logfile in glob.glob("/var/log/dnf.log*"):
    if logfile.endswith(".gz"):
        opener = lambda path: gzip.open(path, "r")
    else:
        opener = open
    with opener(logfile) as inp:
        for lineno, line in enumerate(inp, 1):
            if "Delta RPMs" in line:
                m = RE_DELTARPM.match(line)
                if m is None:
                    sys.stderr.write("{}:{}: invalid line: {!r}\n".format(
                        logfile, lineno, line))
                else:
                    updates += 1
                    total, download = m.groups()
                    total = decimal.Decimal(total)
                    download = decimal.Decimal(download)
                    print("update: size={} downloaded={} savings={}".format(
                        total, download, total - download))
                    total_sum += total
                    download_sum += download
savings = total_sum - download_sum
print("total: count={} size={} downloaded={} savings={} ({:.3}%)".format(
    updates, total_sum, download_sum, savings, (100 * savings) / total_sum))
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux