Maintaining Iceberg tables is essential for performance and cost efficiency. Tasks such as compaction, snapshot cleanup, and metadata optimization are typically manual, but VSP One Object automates them by embedding maintenance directly into the platform.
S3 Table bucket and table owners can define maintenance policies at either level, ensuring tasks run automatically on schedule. Default policies are applied and enabled when a bucket or table is created, but you can adjust or disable them using the S3 Tables Maintenance APIs.
This section explains how to configure automatic maintenance for both buckets and tables, with examples shown using the aws s3tables CLI. You can also use the AWS Python client (boto3). Maintenance jobs run every 24 hours, starting at midnight.
UnreferencedFileRemoval
The UnreferencedFileRemoval policy removes unreferenced files and non-current data versions automatically, helping reduce storage costs and keep metadata clean. It is enabled by default for all new S3 Table buckets, with the following settings:
- unreferencedDays: 4
- nonCurrentDays: 10
TableCompaction
The TableCompaction policy merges multiple small table data files into fewer, larger files to improve Apache Iceberg query performance. It also applies row-level deletes to the latest table version.
Compaction is enabled by default for all tables, using the binpack strategy and a target file size of 128 MB (configurable between 64 MB and 512 MB). Compacted files are written as the most recent snapshot of the table.
SnapshotManagement
The SnapshotManagement policy cleans up old snapshots to control metadata size and maintain query performance. This policy is enabled by default for all S3 Tables, with the following settings:
- minSnapshotsToKeep: 10
- maxSnapshotAgeHours: 2500