Bug 1614312

Summary: FEATURE: Compile with --enable-mode=64
Product: [Fedora] Fedora Reporter: Borax Man <rotflol2>
Component: darAssignee: Luis Bazan <bazanluis20>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 28CC: bazanluis20
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-06 16:12:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Borax Man 2018-08-09 11:20:00 UTC
Description of problem:
Poor performance when performing operations on DAR archives with many files (>100,000).  Performance drops dramatically as number of files increases.

Version-Release number of selected component (if applicable):
2.5.15

How reproducible:
Easily reproducible.

Steps to Reproduce:
1. Create a new dar archive, archiving a directory tree of a few hundred thousand to a million+ files (ie, full system backup)

dar -c backup -R / -M

2. Perform a differential backup using the full backup as reference, or extraction of a file, or list archive or add archive to dar_manager database.

dar -c backup_diff1 -A backup -R / -M
or
dar -l backup

Actual results:
There is a lengthy delay performing step two while dar reads the catalogue, in the order of 5-10 minutes or more.

Expected results:
No long delay


Additional info:

The poor performance is caused by dar's use of its internal class for storing large numbers, infinint.  This class provides very large number support, but was the authors early attempt at creating such a class.

Dar does not rely on this.  64 bit integers can be used with the --enable-mode=64 configure mode which uses native 64 bit types.  Infinint is the default of no other type is specified (unlimited integer size)

The site says that infinint has a performance cost
http://dar.linux.free.fr/doc/from_sources.html

"if set, replace "infinint" integers by 32 or 64 bits integers. This makes a faster executable and less fond of memory, but with several restrictions (about for example ability to handle large files, or high dates. See the limitations for more). Note that 64 bits integers are available on 32 bits CPU plateforms."

In practice, the performance cost seems to be very high, to the point where some operations can seem to have hung.

https://sourceforge.net/p/dar/mailman/dar-support/thread/20120113110808.52a4a8b8%40supagro.inra.fr/

Using the verson of dar supplied by, a listing of the archive containing a backup of my system takes 615 seconds (> 1 million files)

$ time /usr/bin/dar -l root > /dev/null

/usr/bin/dar -l root > /dev/null  615.30s user 1.81s system 107% cpu 9:31.64 total


Using a copy of dar compiled with the --enable-mode=64 flag, the same operation takes 28 seconds.

$ time dar -l root > /dev/null
dar -l root > /dev/null  28.89s user 0.48s system 97% cpu 30.253 total

A speed up of about 20x.

Memory usage is also improved.  The operation using dar compiled with --enable-mode=64 uses 879MB.  The operation using the RPM supplied version with infinint the operation takes over 2124MB


The limitations of using the native 64 bit values are listed here
http://dar.linux.free.fr/doc/Limitations.html
but these do not seem to warrant not using them, as the limits imposed on the dates and file sizes far, far exceed the what todays technology is capable of.


My testing indicates that this does not affect operations, apart from the improvement in speed and memory usage.

To improve the performance of dar significantly, for large archives, as well as the performance of front-ends which use dar or libdar, I recommend that --enable-mode=64 be added to the configuration option for builds of dar for significant performance increases.

I note that the MacOSX version of dar I use uses 64 bit, not unlimited integers, and again, performs satisfactorily in comparison to Fedora.

Comment 1 Fedora Update System 2018-11-30 13:35:32 UTC
dar-2.6.0.RC10-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-3920f35f33

Comment 2 Fedora Update System 2018-12-01 02:43:03 UTC
dar-2.6.0.RC10-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-3920f35f33

Comment 3 Randy Barlow 2018-12-10 23:19:57 UTC
An update associated with this bug has been pushed to stable.