zpaq

Edit Package zpaq

zpaq is a journaling, incremental, deduplicating archiver for Windows and Linux. "Journaling" means that when you update a file or directory, both the old and new versions are saved. You can extract from the archive as it existed at any time in the past. "Incremental", means that when you back up your entire hard drive, for example:

zpaq -add e:backup.zpaq c:\*

that only those files whose last-modified date has changed since the previous backup are added. For 100 GB of files, this typically takes 1-2 minutes, vs. a few hours to create the first version. "Deduplicating" means that identical files or fragments are stored only once to save time and space.

Source Files (show merged sources derived from linked package)
Filename Size Changed
zpaq.changes 0000002739 2.67 KB
zpaq.spec 0000002168 2.12 KB
zpaq715.zip 0001000646 977 KB
Comments 1

Ilgaz Öcal's avatar

ZPAQ Compilation and Performance Report

Issue Summary

The default zpaq binary installed via the system package manager and initial manual compilations resulted in an Illegal instruction (core dumped) error. This occurred because the system is running on an ARM (aarch64) architecture, whereas the default ZPAQ implementation is heavily optimized for x86/x64 systems.

The Fix: -DNOJIT

The crash was resolved by compiling the source code with the -DNOJIT macro: g++ -O3 -DNOJIT zpaq.cpp libzpaq.cpp -lpthread -o zpaq_arm

Why it worked:

  1. x86 JIT Dependency: By default, libzpaq includes a Just-In-Time (JIT) compiler that generates x86 machine code at runtime to execute ZPAQL (the ZPAQ virtual machine language) as fast as possible.
  2. Architecture Mismatch: On an ARM processor, executing these x86-specific instructions is impossible, leading to the "Illegal instruction" signal.
  3. Portable Interpreter: The -DNOJIT flag instructs the library to disable the x86 JIT and instead use a portable, C++-based interpreter for the ZPAQL virtual machine. This allows the software to run correctly on any architecture, including ARM.

Performance Implications

While -DNOJIT ensures compatibility and correctness on this system, it introduces the following performance trade-offs:

  1. Execution Speed: Interpreted code is inherently slower than JIT-compiled machine code. For complex compression methods (levels 4 and 5), decompression and compression speeds may be significantly reduced (often 2x to 5x slower).
  2. CPU Utilization: The CPU will spend more cycles processing the same amount of data compared to an x86 system using the JIT.
  3. Metadata Operations: Operations like list (which we used to identify files) are mostly unaffected as they do not require heavy decompression of data blocks.

Conclusion

The current zpaq_arm binary is stable and safe for use on this ARM-based openSUSE Tumbleweed system. For the purpose of restoring and verifying files, the performance loss is an acceptable trade-off for architectural compatibility.

openSUSE Build Service is sponsored by