This project has been archived by its maintainers, and is no longer receiving any updates.
parasync
Overview
parasync is a parallelized rsync tool written in Python. It is designed to be used in a situation where you have a large number of files to transfer and you want to utilize multiple CPU cores to speed up the transfer. It can also suspend/resume rsync processes based on the CPU usage to avoid overloading the system.
It's inspired by parsync but written in Python. I've been using the original parsync for a long time, but it's no longer maintained and has some issues. So I decided to rewrite it in Python.
Table of Contents
Installation
Just add tap and install homebrew package.
brew tap rioriost/tap
brew install parasync
You can also install it on Linux with homebrew or install it from the source code.
Usage
Execute parasync command.
parasync --help
usage: parasync [-h] [--max-procs MAX_PROCS] [--suspend-threshold SUSPEND_THRESHOLD] [--resume-threshold RESUME_THRESHOLD] [--compress] [--progress]
local_dir remote_path
A tool to transfer all files under a specified directory to a remote location using rsync.
positional arguments:
local_dir The root source directory (all files underneath will be transferred).
remote_path Transfer destination (e.g. "rsync://host/path/").
optional arguments:
-h, --help show this help message and exit
--max-procs MAX_PROCS
Number of rsync processes to run in parallel (if not specified, the number of CPU cores is used).
--suspend-threshold SUSPEND_THRESHOLD
Pause rsync if CPU usage is above this threshold (default: 80.0).
--resume-threshold RESUME_THRESHOLD
Resume rsync if CPU usage is below this threshold (default: 60.0).
--compress, -z Compress file data during transfer.
--progress Display overall transfer progress (total bytes, transfer rate, CPU usage, etc.) every second.
Comparison with the original rsync
-
Environment
- Local: macOS Sequoia 15.3, MacStudio 2022, Apple M1 Max (10-Core), 64GB Mem, 512GB SSD
- Remote: Red Hat Enterprise Linux 8.10, AMD Ryzen 5 5600G (12-Core), 64GB Mem, 2TB NVMe Gen4 SSD
- Network: 10Gbps Ethernet
-
original rsync: 932 Mbps
rsync -av --progress /Users/rifujita/parasync_src/ rsync://192.168.1.2/parasync_tgt/
...
sent 46,861,733,173 bytes received 8,665 bytes 122,194,893.97 bytes/sec
total size is 46,850,265,318 speedup is 1.00
- parasync (--max-procs 10): 3.5 Gbps
parasync --max-procs 10 --progress /Users/rifujita/parasync_src/ rsync://192.168.1.2/parasync_tgt/
...
[Summary] Transferred file count: 454 files, Data transferred: 43.6 GB, Average transfer speed: 3.5 Gbps (Total time: 107.8 seconds)
- parasync (default: --max-procs 9): 5.1 Gbps
parasync --progress /Users/rifujita/parasync_src/ rsync://192.168.1.2/parasync_tgt/
...
[Summary] Transferred file count: 454 files, Data transferred: 43.6 GB, Average transfer speed: 5.1 Gbps (Total time: 74.0 seconds)
- parasync (--max-procs 8): 4.5 Gbps
parasync --max-procs 8 --progress /Users/rifujita/parasync_src/ rsync://192.168.1.2/parasync_tgt/
...
[Summary] Transferred file count: 454 files, Data transferred: 43.6 GB, Average transfer speed: 4.5 Gbps (Total time: 83.2 seconds)
- parasync (--max-procs 7): 4.0 Gbps
parasync --max-procs 7 --progress /Users/rifujita/parasync_src/ rsync://192.168.1.2/parasync_tgt/
...
[Summary] Transferred file count: 454 files, Data transferred: 43.6 GB, Average transfer speed: 4.0 Gbps (Total time: 93.4 seconds)
- parasync (--max-procs 6): 3.0 Gbps
parasync --max-procs 6 --progress /Users/rifujita/parasync_src/ rsync://192.168.1.2/parasync_tgt/
...
[Summary] Transferred file count: 454 files, Data transferred: 43.6 GB, Average transfer speed: 3.0 Gbps (Total time: 125.2 seconds)
Summary
- parasync is faster than the original rsync. But the best number of --max-procs depends on the environment, number of CPU cores and IOPS of SSDs on the local and remote hosts, network bandwidth, and so on.
Limitations
- 0.1.0: parasync uses rsync, not scp or sftp, and so on. If a directory specified does not exist on the remote destination, it fails. Because ryync does not fork shell on the remote host.
e.g.,
parasync /path/to/local_dir/ rsync://host_name/path/to/remote_dir/fails if/pathdoes not exist on the remote host. And, parasync does not use 'compress' option of rsync. With wide network bandwidth, it may be better not to use 'compress' option.
Release Notes
0.1.7 Release
- Move formula to rioriost/tap
0.1.7 Release
- Dependency update.
0.1.6 Release
- Dependency update.
0.1.5 Release
- Dependency update.
0.1.4 Release
- Dependency update.
0.1.3 Release
- Dependency update.
0.1.2 Release
- Dependency update.
0.1.1 Release
- Updated for the dependencies.
0.1.0 Release
- First release.
License
MIT License
Metadata
Release files for parasync 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| parasync-0.1.8.tar.gz | 1.1 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parasync-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / parasync-0.1.8.tar.gz
| Download URL | parasync-0.1.8.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ada4337f466e38df32c0d622a0dcb97d9e6703c175cddd41e8be4ee941bd041
|
|
BLAKE2b-256 checksum How to use checksums |
85afc558714908eb40d43a4b35ce83b7fced77b14a530264b87a75a5fed6fa2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / parasync-0.1.8-py3-none-any.whl
| Download URL | parasync-0.1.8-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
238142a2084cbdef0f6718615d5d1f155fb3c28075f05fdfe4411de1cb924a34
|
|
BLAKE2b-256 checksum How to use checksums |
aa30c64f4d22d4ca1485cc070f8f7eb94b2ef12b1f27f4f518a6988030804ce8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for parasync 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.