I ran into the same issue with
PBS 4.2.8 while syncing approximately 25 TB of backups from a local ZFS datastore to an S3 datastore.
Without max-cache-size configured, the local S3 cache grew to over
2.3 TiB. A previous sync also failed with EDQUOT after reaching the ZFS quota.
I resolved this by explicitly limiting the LRU cache and setting a separate ZFS quota.
1. Set max-cache-size=250G in
/etc/proxmox-backup/datastore.cfg:
backend bucket=<BUCKET>,client=<S3_CLIENT>,type=s3,max-cache-size=250G
2. Set a 500 GiB ZFS quota to leave headroom for metadata, temporary files, and cache operations:
zfs set quota=500G pool/pbs-s3-cache
3. Reload the datastore by switching it offline and back online, after stopping any running jobs:
Code:
proxmox-backup-manager datastore update s3-backup --maintenance-mode type=offline
find /data/pbs-s3-cache/.chunks/ -type f -size +0c -exec truncate --size 0 {} +
proxmox-backup-manager datastore update s3-backup --delete maintenance-mode
This is important because the LRU cache capacity is initialized when the datastore is loaded. Configuration changes do not automatically update the existing cache instance.
I also cleared the previously accumulated local chunk cache while the datastore was offline, preserving the chunk marker files.
Results so far:
- 14.35 TiB uploaded to S3
- Approximately 6.6 million PUT requests
- Sustained throughput around 100–120 MB/s
- Local cache usage around 50–65 GB, instead of several TB
- No further EDQUOT errors so far
The attached screenshot shows the current statistics during synchronization.
Relevant upstream implementation:
LocalDatastoreLruCache – Proxmox source code patch
The implementation is in
pbs-datastore/src/local_datastore_lru_cache.rs, with cache capacity initialization in
pbs-datastore/src/datastore.rs.
The important distinction is that
max-cache-size controls the local LRU chunk cache, while the ZFS quota limits overall filesystem usage. The LRU limit is based on the number of chunks rather than being a strict filesystem byte limit.
The sync is still running, so these are preliminary results, but the cache behavior is already significantly better.
Hopefully this helps others running larger PBS-to-S3 synchronization jobs.
