When you update an RPM package in Redhat/Fedora linux, you will be downloading the entire package even if only a single file in package has changed. This is not an issue if network bandwidth is not an issue but if you have servers in remote sites with limited bandwidth or your PC/Laptop is connected to a low bandwidth network or internet or even if you use your internet on a pay as you go network then can be a big concern.
Good news is we now have Delta RPMS. Delta RPMS downloads only the difference (Delta) between the old and new packages saving significant bandwidth in the process. Delta RPMS (DRPM) know the difference between old and new versions of the RPM even if the old version is not installed on the system.
Starting Fedora 11, Delta RPMs are enabled by default and has the “deltarpm” package installed on the system. However, Fedora’s enterprise counterpart doesnt install this by default.
To know if you have deltarpm installed, check if the deltarpm package is installed.
# yum list deltarpm
or when you run a yum update you may see this message just before the download starts
Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
To enable Delta RPM, install the package.
[root@c7vanilla ~]# yum install deltarpm -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.mirrorservice.org * epel: mirrors.n-ix.net * extras: www.mirrorservice.org * updates: mirrors.coreix.net Resolving Dependencies --> Running transaction check ---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: deltarpm x86_64 3.6-3.el7 base 82 k Transaction Summary ================================================================================ Install 1 Package Total download size: 82 k Installed size: 209 k Downloading packages: deltarpm-3.6-3.el7.x86_64.rpm | 82 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : deltarpm-3.6-3.el7.x86_64 1/1 Verifying : deltarpm-3.6-3.el7.x86_64 1/1 Installed: deltarpm.x86_64 0:3.6-3.el7
Now, when you run a yum update, you can see deltarpm in action. It downloads delta rpms (DRPM) where available for a package and indicates how much download data bandwidth is saved. Check the lines in highlighted in yellow in the following output.
[root@c7vanilla ~]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: www.mirrorservice.org
* epel: mirrors.n-ix.net
* extras: www.mirrorservice.org
* updates: mirrors.coreix.net
Resolving Dependencies
--> Running transaction check
---> Package gnutls.x86_64 0:3.3.8-12.el7_1.1 will be updated
---> Package gnutls.x86_64 0:3.3.8-14.el7_2 will be an update
---> Package grub2.x86_64 1:2.02-0.33.el7.centos.1 will be updated
---> Package grub2.x86_64 1:2.02-0.34.el7.centos will be an update
;;;
;;
SKIPPING
;;
;;;
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
kernel x86_64 3.10.0-327.4.4.el7 updates 33 M
Updating:
gnutls x86_64 3.3.8-14.el7_2 updates 662 k
grub2 x86_64 1:2.02-0.34.el7.centos updates 1.5 M
grub2-tools x86_64 1:2.02-0.34.el7.centos updates 3.3 M
kernel-tools x86_64 3.10.0-327.4.4.el7 updates 2.4 M
kernel-tools-libs x86_64 3.10.0-327.4.4.el7 updates 2.3 M
nss x86_64 3.19.1-19.el7_2 updates 852 k
nss-sysinit x86_64 3.19.1-19.el7_2 updates 54 k
nss-tools x86_64 3.19.1-19.el7_2 updates 484 k
openssl x86_64 1:1.0.1e-51.el7_2.2 updates 711 k
openssl-libs x86_64 1:1.0.1e-51.el7_2.2 updates 950 k
python-perf x86_64 3.10.0-327.4.4.el7 updates 2.4 M
Transaction Summary
================================================================================
Install 1 Package
Upgrade 11 Packages
Total download size: 48 M
Downloading packages:
updates/7/x86_64/prestodelta | 140 kB 00:01
Delta RPMs reduced 2.0 M of updates to 462 k (76% saved)
(1/12): gnutls-3.3.8-12.el7_1.1_3.3.8-14.el7_2.x86_64.drpm | 73 kB 00:00
(2/12): nss-3.19.1-18.el7_3.19.1-19.el7_2.x86_64.drpm | 119 kB 00:00
(3/12): nss-tools-3.19.1-18.el7_3.19.1-19.el7_2.x86_64.drp | 270 kB 00:06
(4/12): grub2-2.02-0.34.el7.centos.x86_64.rpm | 1.5 MB 00:08
(5/12): nss-sysinit-3.19.1-19.el7_2.x86_64.rpm | 54 kB 00:01
(6/12): kernel-tools-3.10.0-327.4.4.el7.x86_64.rpm | 2.4 MB 00:13
(7/12): openssl-1.0.1e-51.el7_2.2.x86_64.rpm | 711 kB 00:09
(8/12): openssl-libs-1.0.1e-51.el7_2.2.x86_64.rpm | 950 kB 00:08
(9/12): kernel-tools-libs-3.10.0-327.4.4.el7.x86_64.rpm | 2.3 MB 00:32
(10/12): python-perf-3.10.0-327.4.4.el7.x86_64.rpm | 2.4 MB 00:15
(11/12): grub2-tools-2.02-0.34.el7.centos.x86_64.rpm | 3.3 MB 01:00
(12/12): kernel-3.10.0-327.4.4.el7.x86_64.rpm | 33 MB 02:56
--------------------------------------------------------------------------------
Total 271 kB/s | 47 MB 02:57
Running transaction check
Running transaction test
Transaction test succeeded