Last updated: 8 Apr 26 16:41:04 (UTC)
Mega S4 Rclone settings
It sounds like you’re looking to squeeze every bit of performance out of the MEGA S4 (Simple S3 Storage) service. Since S4 is MEGA’s S3-compatible offering, you’ll actually want to treat it as an s3 backend in rclone rather than using the standard mega backend (which is for their consumer-grade accounts).
Here are the optimal settings to balance speed and reliability for an S3-compatible service like S4.
1. The Core Configuration
When running rclone config, ensure you select Amazon S3 Compliant Storage Provider and use the following specifics for S4:
- Provider:
Other - Endpoint:
s3.mega.io(or the specific regional endpoint provided in your dashboard) - ACL:
private
2. Recommended Flags for Speed
MEGA S4 handles parallel connections well. You can push these limits depending on your local bandwidth.
| Flag | Recommended Value | Why? |
|---|---|---|
--transfers |
8 to 16 |
Increases the number of files uploaded/downloaded in parallel. |
--checkers |
16 |
Speeds up the initial “handshake” and comparison phase. |
--s3-upload-concurrency |
8 |
Allows a single large file to be uploaded in multiple chunks simultaneously. |
--s3-chunk-size |
64M to 128M |
Larger chunks improve throughput on high-speed lines but use more RAM. |
3. Optimizing the “Feel” (Mounting)
If you are using rclone mount to use S4 like a local drive, these settings prevent the “laggy” feeling often associated with cloud mounts:
rclone mount mega_s4:path/to/bucket /local/mount/point \ --vfs-cache-mode full \ --vfs-cache-max-age 24h \ --vfs-cache-max-size 10G \ --buffer-size 32M \ --vfs-read-chunk-size 32M \ --vfs-read-chunk-size-limit 1G
rclone mount mega_s4:path/to/bucket /local/mount/point \
--vfs-cache-mode full \
--vfs-cache-max-age 24h \
--vfs-cache-max-size 10G \
--buffer-size 32M \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit 1GNote:
--vfs-cache-mode fullis the “magic” setting here. It ensures that files are staged locally before being pushed to S4, which prevents apps from crashing when they try to write to the cloud.
4. Pro-Tips for MEGA S4
- Avoid Small Files: S3-compatible storage (including S4) generally performs better with larger files. If you have millions of tiny files, consider zipping them before the transfer.
- Memory Management: If you are running this on a low-RAM device (like a Raspberry Pi), keep
--s3-chunk-sizeat16Mand--transfersat4. Each transfer multiplied by the chunk size consumes RAM:\text{RAM Usage} \approx \text{Transfers} \times \text{Chunk Size} - Use a Config Password: Since S4 involves access keys that could grant full billing access, encrypt your
rclone.confduring the setup process.
Are you planning on using this primarily for automated backups, or as a live mounted drive for media?