Bug 16863

Summary: Compile 'tar' with the --with-bzip2=lbzip2 parameter for improved performance
Product: Mageia Reporter: Frédéric "LpSolit" Buclin <LpSolit>
Component: RPM PackagesAssignee: Shlomi Fish <shlomif>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Normal CC: thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: tar CVE:
Status comment:

Description Frédéric "LpSolit" Buclin 2015-09-30 20:18:58 CEST
As documented at http://www.gnu.org/software/tar/manual/html_section/tar_69.html#SEC135, the 'tar' application can be compiled with

  ./configure --with-bzip2=lbzip2

to automatically use lbzip2 to compress/decompress archives. The perf win is significant on machines with multiple processors. For instance, with a dual core:

$ time tar -xjf GeoGebra-Linux-Portable-5.0.150.0.tar.bz2

real    0m12.243s
user    0m11.890s
sys     0m0.390s


$ time tar -xf GeoGebra-Linux-Portable-5.0.150.0.tar.bz2 -I lbzip2

real    0m5.785s
user    0m8.910s
sys     0m1.590s


The lbzip2 utility is already available since Mageia 4, see bug 11001.
Comment 1 Samuel Verschelde 2015-09-30 20:46:36 CEST
Assigning to maintainer Shlomi Fish. I don't think we'll want to do that in Mageia 5 though, thus setting version to cauldron.

Version: 5 => Cauldron
Assignee: bugsquad => shlomif

Thierry Vignaud 2015-10-01 09:02:52 CEST

CC: (none) => thierry.vignaud
Hardware: i586 => All
Source RPM: (none) => tar

Comment 2 Shlomi Fish 2015-10-01 09:12:15 CEST
Hi,

(In reply to Frédéric Buclin from comment #0)
> As documented at
> http://www.gnu.org/software/tar/manual/html_section/tar_69.html#SEC135, the
> 'tar' application can be compiled with
> 
>   ./configure --with-bzip2=lbzip2
> 
> to automatically use lbzip2 to compress/decompress archives. The perf win is
> significant on machines with multiple processors. For instance, with a dual
> core:
> 
> $ time tar -xjf GeoGebra-Linux-Portable-5.0.150.0.tar.bz2
> 
> real    0m12.243s
> user    0m11.890s
> sys     0m0.390s
> 
> 
> $ time tar -xf GeoGebra-Linux-Portable-5.0.150.0.tar.bz2 -I lbzip2
> 
> real    0m5.785s
> user    0m8.910s
> sys     0m1.590s
> 
> 
> The lbzip2 utility is already available since Mageia 4, see bug 11001.

Would this mean adding another dependency (= lbzip2) to tar? If so, I'd rather not because tar is required by basesystem-minimal. One option would be to set up an /etc/alternatives/bzip2 system or use a small script that delegates to either bzip2 or lbzip2.

Regards,

-- Shlomi Fish
Comment 3 Frédéric "LpSolit" Buclin 2015-10-01 12:56:27 CEST
(In reply to Shlomi Fish from comment #2)
> Would this mean adding another dependency (= lbzip2) to tar?

Yes. But lbzip2 is a small package.


> One option would
> be to set up an /etc/alternatives/bzip2 system or use a small script that
> delegates to either bzip2 or lbzip2.

This would affect all applications calling bzip2 instead of just tar. If that's the desired behavior, that's fine with me.
Comment 4 Frédéric "LpSolit" Buclin 2017-04-16 23:06:31 CEST
ping? What's the decision about my proposal?
Comment 5 Shlomi Fish 2017-04-17 02:40:39 CEST
(In reply to Frédéric Buclin from comment #4)
> ping? What's the decision about my proposal?

hi!

Thanks for the pinging. I'm not too keen on adding a new dependency to tar (however small it may be) and it seems like using /etc/alternatives for bzip2 will add complexity to our setups. One thing you can try instead is to build your own tar into a prefix (say /opt/tar or /usr/local) and use that.
Comment 6 Frédéric "LpSolit" Buclin 2017-04-17 11:28:21 CEST
OK, so this means wontfix.

I locally added a symlink named /etc/alternatives/bzip2 pointing to /bin/lbzip2. I guess this should do it.

Resolution: (none) => WONTFIX
Status: NEW => RESOLVED