Speed Showdown: Comparing Archive Tools
Posted on Sunday, May 24, 2026
When backing up data, speed matters. However, not all archiving tools offer comparable performance. I recently conducted a practical speed comparison among four popular Unix/Linux archivers to evaluate their real-world efficacy.
Test Setup
For this test, I utilized a local directory on my laptop. This directory, totaling 3.3 GB, contains data that frequently requires full backups.
To ensure a fair comparison, all tools employed gzip compression.
The Contenders
I ran the tests from within the directory with the following commands:
| Tool | Command |
|---|---|
| tar | tar -cvzf ~/backup.tar.gz . |
| afio | find . | afio -voZ ~/backup.afio |
| cpio | find . | cpio -oc | gzip -c > ~/backup.cpio.gz |
| pax | find . | pax -wvz -f ~/backup.pax.gz |
Performance Results
Execution Time
Execution times were measured with the standard time utility.
| Tool | Real Time | User Time | Sys Time |
|---|---|---|---|
| afio | 3.42s | 1.02s | 2.41s |
| tar | 1m41.6s | 1m40.3s | 0m3.2s |
| cpio | 1m39.9s | 1m39.7s | 0m6.4s |
| pax | 9m6.6s | 8m59.1s | 0m16.7s |
Archive Sizes
The resulting archive sizes were:
| Tool | Size | Compression Ratio |
|---|---|---|
| tar | 3.21 GB | ~97% |
| cpio | 3.21 GB | ~97% |
| afio | 3.45 GB | ~94% |
| pax.gz | 16.87 GB | ~51% |
Key Findings
afio: The Speed Champion
afio completed the backup in just 3.4 seconds, which is approximately 30 times faster than both tar and cpio, and nearly 160 times faster than pax.
The primary trade-off for this speed is a slightly larger archive (3.45 GB compared to 3.21 GB for tar/cpio), though the difference is marginal (approximately 7% larger).
tar & cpio: Reliable Workhorses
Both tar and cpio exhibited nearly identical performance, completing the task in approximately 1 minute 40 seconds. Their archive sizes were also virtually identical. These tools remain solid, well-supported choices for most backup scenarios.
pax: The Performance Outlier
pax was dramatically slower, taking 9 minutes, and produced an archive five times larger than the others. Unless specific compatibility requirements necessitate its use, there is little reason to choose pax for standard backups. Personally, I only use pax when compatibility with Unix SVR4 is required.
Why Is afio So Fast?
Brief research indicates that afio’s performance advantage stems from several architectural optimizations:
- Direct I/O: Uses low-level I/O flags (like O_DIRECT) to bypass kernel page cache pollution
- Large Buffers: Employs very large read/write buffers and memory mapping (mmap)
- Bulk Metadata: Minimizes system calls by gathering file metadata in bulk rather than calling stat() for each file
- Reduced Overhead: Avoids per-file processing loops and unnecessary checksum calculations
These optimizations make afio particularly effective when archiving directories with many small files - a common workload that typically bottlenecks other tools.
Conclusion
If raw backup speed is your priority and you can accept a marginally larger archive, afio stands out significantly. However, it is important to note that afio is currently in “maintenance mode” and is no longer under active development. As of this writing, its last release was in 2018.
For more general-purpose backups where tool availability and ecosystem support are higher priorities, tar remains a safe and reliable choice. cpio can be a good alternative to tar but is less frequently used today.
pax may be the best option for archive compatibility across various operating systems, especially older ones.
References
Tags: misc

