Automatic EC Vacuum
SeaweedFS Enterprise includes EC volume vacuum, a background worker that continuously monitors your erasure-coded volumes for deleted data and compacts them by removing deleted needles. When EC volumes accumulate many deleted entries, vacuum reclaims wasted space and improves storage efficiency without manual intervention.
The key design advantage is that compaction happens on dedicated workers, not on the volume servers. The worker collects an EC volume’s shards into its own working directory, vacuums them locally, and distributes the compacted shards back — so volume servers stay focused on serving and never carry the CPU and disk cost of compaction.
When to use it
- Aging or churning datasets — once deleted data piles up in EC shards, that space stays allocated until vacuum reclaims it.
- Large EC volumes where waste adds up — a 100GB EC 10+4 volume with 40% deletes drops from ~140GB to ~84GB after vacuum (a 40% saving).
- High-density EC ratios — ratios like 20+4 benefit most from reclaiming deleted-needle space.
- Hands-off operation — you want compaction to run continuously in the background without manual rebalancing.
How to use it
EC Vacuum runs as a plugin worker. Start one or more weed worker processes that connect to the admin server — it is automatically included when the erasure_coding handler is enabled:
# Start a worker for EC tasks (includes EC encoding, EC repair, and EC vacuum)
weed worker -admin=admin.example.com:23646 -jobType=erasure_coding \
-workingDir=/var/lib/seaweedfs-plugin -maxExecute=2
Vacuum then scans on a schedule (default every 30 min) and compacts any volume past the deleted-ratio threshold (default 30%). Run at least 2 workers for high availability and allocate enough -workingDir space for the largest concurrent job.
Benefits
- Storage optimization — reclaim wasted space in EC volumes without costly rebalancing.
- Volume server protection — heavy compaction runs on workers, so volume servers aren’t overloaded by vacuum CPU and local disk rewrite work.
- Automatic operation — vacuum runs continuously in the background.
- Custom EC support — works with any custom EC ratio (e.g., 20+4, 16+6).
- Rack-aware placement — maintains shard distribution for maximum failure-domain diversity.
- Scalable efficiency — global coordination prevents overwhelming the cluster with concurrent compactions.
Want the internals — the detection and compaction phases, safety guarantees, the full configuration table, worker flags, Helm values, health checks, and metrics? See the Automatic EC Vacuum technical reference.