Auto-compaction

Since

LeoFS v1.2.2

Purpose

The compaction mechanism supports to remove unnecessary objects in a node of LeoFS Storage. And also, this mechanism does not block retrieving and putting object during data-compaction as much as possible.

Since LeoFS 1.2.2 it is possible to execute automatic data-compaction in order to reduce administration-costs and Keep running a storage cluster stably. You need to only modify the auto-compaction configuration.

Getting Started

Pre-requirement

Note

The auto-compaction mechanism communicates with the watchdog mechanism in order to restrict load of the processing and keep running the node. If you would like to use that, you need to set up the watchdog configuration.

Configuration of LeoFS Storage

Modify leo_storage.conf at the section of auto-compaction.

LeoFS Storage’s auto-compaction properties:

Property Default value Description
autonomic_op.compaction.is_enabled false
  • Is enabled auto-compaction? [true|false]
autonomic_op.compaction.parallel_procs 1
  • Number of parallel procs of data-compaction
autonomic_op.compaction.interval 3600
  • Execution interval time between data-compaction (sec)
autonomic_op.compaction.warn_active_size_ratio 70
  • Warning ratio of active size (%)
  • NOT affects the auto-compaction by this configuration yet. We plan to support this configuration with v1.4.
autonomic_op.compaction.threshold_active_size_ratio 60
  • Threshold ratio of active size (%)
  • (Size of active objects / Size of total objects) * 100 (%)
  • When it becomes less than the ratio, LeoFS Storage executes data-compaction automatically