Skip to content

Request compressed rpm transfer#146

Open
bmwiedemann wants to merge 1 commit into
openSUSE:masterfrom
bmwiedemann:compress
Open

Request compressed rpm transfer#146
bmwiedemann wants to merge 1 commit into
openSUSE:masterfrom
bmwiedemann:compress

Conversation

@bmwiedemann

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@mlschroe

Copy link
Copy Markdown
Member

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

@mlandres

Copy link
Copy Markdown
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.

3 participants