xcp-ng / xcp

Entry point for issues and wiki. Also contains some scripts and sources.
https://xcp-ng.org
1.31k stars 74 forks source link

Feature request: use deltarpm for updates #120

Open sammcj opened 5 years ago

sammcj commented 5 years ago

DeltaRPM reduces both download and install time of packages on RHEL based systems.

Delta RPM packages contain the difference between an old and a new version of an RPM package. Applying a delta RPM on an old RPM results in the complete new RPM. It is not necessary to have a copy of the old RPM, because a delta RPM can also work with an installed RPM. The delta RPM packages are even smaller in size than patch RPMs, which is an advantage when transferring update packages over the Internet. The drawback is that update operations with delta RPMs involved consume considerably more CPU cycles than plain or patch RPMs.

Note: Above mention of increased CPU cycles IMO is negligible of even close-to-modern processors, if someone was to use a very old and underpowered processor (one might wonder why they'd want to virtualise on top of it in the first place) they can simply disable deltarpm by adding deltarpm=0 to yum.conf (and dnf.conf in the future).

DeltaRPM is available in base:

# yum info deltarpm --enablerepo=*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.serversaustralia.com.au
 * centosplus: centos.mirror.serversaustralia.com.au
 * extras: centos.mirror.serversaustralia.com.au
 * updates: centos.mirror.serversaustralia.com.au
Available Packages
Name        : deltarpm
Arch        : x86_64
Version     : 3.6
Release     : 3.el7
Size        : 82 k
Repo        : base/7/x86_64
Summary     : Create deltas between rpms
URL         : http://gitorious.org/deltarpm/deltarpm
License     : BSD
Description : A deltarpm contains the difference between an old
            : and a new version of a rpm, which makes it possible
            : to recreate the new rpm from the deltarpm and the old
            : one. You don't have to have a copy of the old rpm,
            : deltarpms can also work with installed rpms.

Widely used and tested and plenty of information about deltarpm around the interwebs (e.g. https://www.certdepot.net/rhel7-get-started-delta-rpms/)


This is an improvement suggestion as per a brief discussion on the XCP-ng forums based on my XenServer and CentOS tuning experiences.

stormi commented 5 years ago

I guess you do not simply suggest that we install deltarpm but also that we provide delta RPMs for our updates?

sammcj commented 5 years ago

I think a good first step would be to at least include deltarpm as a package.

I would guess that it would be likely that most people would need select packages from the CentOS repos in addition to the xcp-ng repo, e.g. for monitoring, backups, admin tooling, auditing etc... and these would benefit from deltarpm being installed first.

Of course it would be nice to have the XCP-ng RPMs created as deltarpms, this is a quick-and-easy package to include in the base install (perhaps installing it early might decrease install time too? I'm not sure of that?).