Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request compressed rpm transfer #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bmwiedemann
Copy link
Member

Request compressed rpm transfer, if server supports it. This can save 10-70% of transfer bandwidth, because (d)rpm metadata is uncompressed

E.g.

curl -L -v http://download.opensuse.org/update/leap/15.0/oss/noarch/kernel-source-vanilla-4.12.14-lp150.12.22.1_lp150.12.25.1.noarch.drpm | gzip -c1 | wc -c

compresses 11157036 bytes to 4161087

On the downside, it adds 32 byte to every HTTP request header
which would add 256 microseconds on a 1MBit/s line.

Also, none of the public openSUSE mirrors support compression of (d)rpm files yet and if they did, it could cause some server-side CPU load.

Note: Only tested downloading single rpm with zypper in -d http://aw.lsmod.de/rpm/test.rpm

Not yet tested with multicurl.

if server supports it, this can save 10-70% of transfer bandwidth
because (d)rpm metadata is uncompressed

E.g.
curl -L -v http://download.opensuse.org/update/leap/15.0/oss/noarch/kernel-source-vanilla-4.12.14-lp150.12.22.1_lp150.12.25.1.noarch.drpm | gzip -c1 | wc -c
compresses 11157036 bytes to 4161087

On the downside, it adds 32 byte to every HTTP request header
which would add 256 microseconds on a 1MBit/s line.
@mlschroe
Copy link
Member

Please do this only for "small enough" rpms (i.e. there should be some threshold) and not for all files.

@mlschroe
Copy link
Member

(we even know the header size, so we can do something clever)

@mlandres
Copy link
Member

(we even know the header size, so we can do something clever)

The media backend does not know anything about the file (just the URL and maybe the expected size). And the .rpm from download.opensuse.org (via public openSUSE mirrors) are handled by multicurl (i.e. are not covered by the patch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants