Intelligent Compaction

Iceberg compaction that sorts for how you query

Merges small files and sorts them by the columns your queries filter on, when each table needs it. Runs on a Rust engine, 95% faster than Spark, with no jobs to schedule.

Sort from your queries
Query-aware
Faster than Spark
95%
Faster queries
12×
LakeOps LogoLakeOps

Last 30 days Optimization Activity

Total Operations
12,211
Last 90 days
Query Speed
12.4×
Avg. acceleration across engines
Cost Savings
$1,374,672
Saved in last 3 months
CPU & Storage
-76%
Last 90 days
Data Optimized
46.8 PB
Last 30 days

Key Metrics

Total Tables
786
Tables in all catalogs
Critical Tables
70
Require immediate attention
Warning Tables
105
Should be addressed or auto-piloted
Healthy Tables
566
Tables in optimal state
Total Data
112.4 PB
Total lake data size

Storage

-56% reclaimed
30d
112 TB75 TB38 TB
Storage used

CPU

-76% reduction
30d
100%66%33%
Compute hours

Recent Operations

Last 10 operations
OperationTableDurationImpactTimeStatus
Compact Data Files
customer_orders
orders
4s1.24 TB, 16 → 1 files57 minutes agoSUCCESS
Expire Snapshots
payment_transactions
payments
27s8.2 TB4 hours agoSUCCESS
Expire Snapshots
inventory_snapshots_20250702
warehouse
3s2.1 TB4 hours agoSUCCESS
Rewrite Manifests
raw_clickstream
analytics
1.9s3 → 1 manifests5 hours agoSUCCESS
Compact Data Files
product_catalog
products
6m 11.3s3,008 → 1,256 files6 hours agoSUCCESS

Lake Events

LiveLast 24 hours
Compact Data Files·customer_orders
ecommerce_prod·1.24 TB, 16 → 1 files
4s57 min agoOK
Expire Snapshots·payment_transactions
ecommerce_prod·12 snapshots expired
4.6s1h agoOK
Compact Data Files·raw_clickstream
marketing_events·970 → 87 files
9m 31.6s2h agoOK
Remove Orphan Files·user_sessions
marketing_events·847 MB reclaimed, 1,203 files
1m 12s3h agoOK
Rewrite Manifests·search_query_logs
ecommerce_prod·487 → 12 manifests
2.1s3h agoOK
Expire Snapshots·inventory_levels
warehouse_analytics·62 snapshots, 18.4 GB freed
27s4h agoOK
Compact Data Files·product_catalog
ecommerce_prod·3,008 → 1,256 files
6m 11.3s5h agoOK
Rewrite Manifests·shipping_events
warehouse_analytics·14 → 3 manifests
1.0s6h agoOK
Remove Orphan Files·balance_snapshots
warehouse_analytics·59,831 files, 74.8 GB
13m 6.9s7h agoOK
Compact Data Files·ad_impressions
marketing_events·42,633 → 69 files
2m 18s8h agoOK
No vendor lock-in
No code / infra changes
No data changes
REST API & MCP

Open and runs on your stack

AWS
Azure
Google Cloud
Snowflake
Databricks
Apache Flink
Apache Iceberg
Delta Lake
DuckDB
Dremio
Lakekeeper
ClickHouse
AWS
Azure
Google Cloud
Snowflake
Databricks
Apache Flink
Apache Iceberg
Delta Lake
DuckDB
Dremio
Lakekeeper
ClickHouse

How it works

From small files to fast scans, without Spark jobs

LakeOps measures every table's files from its metadata, compacts the tables that need it, and records every run.

  1. Connect a catalog

    Point LakeOps at AWS Glue or any Iceberg REST catalog. Your data stays in your bucket.

  2. Measure file health

    Each scan tracks small files, compactable bytes, and delete files in every table.

  3. Compact when it's due

    Bin-pack or sort on the Rust engine, committed as a new snapshot. Writers keep going.

  4. See the result

    Every run is logged in Events with files in and out, duration, and status.

Adaptive Maintenance
Running
⚡Compaction Scope— what will be targeted this run

Monitoring started at seq #4,812. Everything written from that point on is in scope.

already compacted
38% hot zone — will compact
#4,812 baseline#7,104 watermark#8,506 now
📦Compaction
Last: 57 minutes agoNext: in 2h
62%
•42% of data files are below the 384 MB size threshold
•1.24 TB compactable — will merge into ~3 files at 512 MB target
•16 delete files amplify read cost — compaction will absorb them
⚡Snapshot Expiration
Last: 4 hours agoNext: in 20h
31%
•12 of 83 snapshots have passed the retention window
•Retention policy: 5.0 days
•Table creates 3.2 snapshots/hr — stale ones accumulate quickly
🧹Rewrite Position Deletes
Last: 7 hours agoNext: in 9h
24%
•16 position delete files across 4 partitions
•Delete ratio 6% — below the rewrite threshold
📝Rewrite Manifests
Last: 5 hours agoNext: in 1h
78%
•92 total manifests: 89 data + 3 delete
•Accumulating 2.1 manifests/hr — metadata overhead grows
•High manifest count degrades query planning and scan performance

01 · When to compact

Compacts each table when its files need it

On every scan, LakeOps reads each table's metadata: the share of small files, how many bytes can be compacted, delete files, and how fast they grow. Compaction runs when those signals cross a threshold, so busy streaming tables compact as often as they need and healthy tables are left alone.
  • Automatic mode compacts when signals cross a threshold, with no cron
  • Scheduled mode keeps compaction inside a cron window and runs only when it's due
  • The Maintenance tab shows compaction's score, its projected trigger time, and a cooldown so it never runs back to back
  • Run it once now from the console, the REST API, or the MCP server
Compaction impactQuery-aware

Access patterns · 2,847 queries

WHEREcustomer_id
89%
WHEREevent_date
76%
JOINproduct_id
64%
GROUPregion
51%

Before

Files970
Orderappend order

After

Files87
Ordercustomer_id, date

Query time

12×

faster, 51% less scanned

Compute cost

−76%

query CPU

Storage cost

−62%

S3 GET requests

02 · Query-aware sort

Sorts files for how your queries read them

Merging small files fixes the file count. Sorting is what makes queries faster. LakeOps learns the columns your queries filter, join, and group on, then rewrites files so related rows sit together. Column statistics get tight, and engines skip whole files instead of scanning them.
  • Query-aware sort: learns WHERE, JOIN, and GROUP BY columns from production traffic
  • Query time: up to 12× faster, with 51% less data scanned per query
  • Compute cost: up to 76% less query CPU on every engine that reads the table
  • Storage cost: 970 → 87 files on a typical table, with 62% fewer S3 GETs per query
Engine benchmark200 GB

Binpack compaction · 200 GB / 600M rows

Amazon S3 Tables
~32 MB/s6,300s
Spark
~350 MB/s1,612s
LakeOps
2,522 MB/s221s

Production tables · files

balance_snapshots1,192 GB11,957→3,270
raw_sdk_events8 GB42,633→69
cluster_registry322 GB878→400

95%

Faster than Spark

90%

Cheaper than Spark

2,522

Peak MB/s

0

Clusters to run

03 · Rust engine

95% faster and 90% cheaper than Spark

Compaction is a narrow job: read files, merge them, write them back. Spark runs it on a general-purpose cluster with JVM overhead and memory to tune. LakeOps runs it on a purpose-built Rust engine on Apache DataFusion, on LakeOps-managed compute, with no cluster for you to size or keep warm.
  • 200 GB compacted in 221 seconds, versus 1,612 for Spark and 6,300 for S3 Tables
  • A 1.2 TB table that ran Spark out of memory finished in about 11 minutes
  • About 90% less compute than Spark for the same compaction
  • Peak throughput of 2,522 MB/s on production tables
Compact Data FilesPolicy

Strategy

Binpack

Merge small files to the target size

Sort

Cluster rows so engines skip files

Target file size

512 MB

Sort order

customer_id, event_date

Predicate

file_size < 134217728 OR delete_file_count > 0

Scope

catalog: ecommerce_prodnamespace: ordersexclude: orders.tmp_*

Binpack

Default strategy

Sort

With a sort order

512 MB

Default target

04 · Bin-pack or sort

The right strategy and file size for each table

Bin-pack merges small files to the target size and is the default. Sort rewrites files in the table's Iceberg sort order for tables where scan reduction matters. Files are sized to the table's write.target-file-size-bytes, or 512 MB, and a predicate can limit a run to the files that need it.
  • Use table properties: each table gets sort if it has an Iceberg sort order, bin-pack otherwise
  • Predicates on file size, record count, delete files, or partition limit what gets rewritten
  • Strategy and target size are set in a Compact Data Files policy for a catalog, namespaces, or tables
Delete filesMerge-on-read

Before

Data files1,240
Position deletes847
Equality deletes63
Read overhead+340ms

After

Data files94
Position deletes0
Equality deletes0
Read overhead0ms
✓Compact Data Files— deletes applied to rewritten files
✓Rewrite Position Deletes— 847 delete files → 0
✓Remove Dangling Deletes— no live data left to apply to

05 · Delete files

Deletes applied, so reads stop paying for them

Merge-on-read tables pile up position and equality delete files with every UPDATE, DELETE, and MERGE, and each read must reconcile live rows against them. Compaction rewrites the affected data files with the deletes applied. Adaptive Maintenance then rewrites position deletes and removes delete files that no longer apply to any data.
  • Target files with delete_file_count > 0 in the compaction predicate
  • CDC and upsert tables stop paying the merge-on-read cost on every read
  • Iceberg deletion vectors supported
Layout simulationscustomer_orders
Sort by event_date, region
8.3×
−62% scan

sim/sort-date-region

Sort by customer_id, event_dateBest match
12.4×
−76% scan

sim/sort-cust-date

Sort by product_id, region
4.1×
−41% scan

sim/sort-prod-region

76%

Less data scanned

12.4×

Estimated speedup

0

Production writes

06 · Layout simulations

Compare sort strategies before rewriting a table

Not sure whether sorting by event_date or customer_id helps more? Layout simulations compare candidate sort orders on Iceberg branches and estimate scan reduction and speedup for each, without touching production files. Apply the winner when you're ready.
  • Branch-based: production tables stay untouched while you compare
  • Side by side: data scanned, file layout, and estimated speedup
  • No guessing on terabyte rewrites

Policies

Manage maintenance, configuration, and lifecycle policies for your data lakehouse

OnPolicyTypeNext RunLast RunUpdatedActions
orders_critical
Compact FilesApr 25, 2026, 8:12 AMApr 25, 2026, 03:05 AMFeb 01, 2025, 3:46 PM•••
payments_compact
Compact FilesFeb 15, 2026, 12:06 AMFeb 1, 2025, 02:18 PMFeb 5, 2025, 4:03 PM•••
Remove orphan files (e-ip...)
For all tables in all catalogs every 7 days
Orphan FilesApr 25, 2026, 8:12 AMApr 25, 2026, 04:07 PMJun 23, 2025, 04:01 PM•••
clickstream_cdc_events_p
Expire SnapshotsApr 25, 2026, 12:03 AMApr 25, 2026, 03:05 AMJan 28, 2025, 03:25 PM•••
sessions_cdc_events_p
Expire SnapshotsApr 25, 2026, 12:03 AMApr 26, 2026, 03:05 AMJun 26, 2025, 11:11 PM•••
global_expire_snapshots
Runs snapshot expiration on all tables once a day
Expire SnapshotsApr 26, 2026, 1:18 PMApr 07, 2026, 01:08 PMMar 14, 2026, 8:42 AM•••
manifest_rewrite_weekly
Rewrite manifests for all critical tables weekly
Rewrite ManifestsApr 28, 2026, 2:00 AMApr 21, 2026, 02:00 AMMar 10, 2026, 9:15 AM•••
staging_config
Configuration——Dec 31, 2025, 02:45 PM•••

07 · Policies

Compaction rules once, for every table they cover

A Compact Data Files policy sets the strategy, target size, predicate, and schedule for all catalogs, one catalog, or namespaces and tables by exact name or regex. Exclude lists keep tables another system owns out of scope, and new tables inherit the policy when they're discovered.
  • A table policy overrides the governance policy that would otherwise apply
  • Exclude tables written by other platforms, and keep watching their health
  • Manage policies from the console, the REST API, or MCP

Events

View and track table operations and history

Table NameNamespaceCatalogOperation TypeImpactDurationStart TimeStatus
customer_ordersordersecommerce_prodCompact Data Files1.24 TB, 16 → 1 files4s57 min agoSUCCESS
customer_ordersordersecommerce_prodCompact Data Files11 → 8 files10.3s2h agoSUCCESS
customer_ordersordersecommerce_prodCompact Data Files970 → 87 files6m 1.0s3h agoSUCCESS
payment_transactionspaymentsecommerce_prodExpire Snapshots1 snapshot4.6s4h agoSUCCESS
payment_transactionspaymentsecommerce_prodRewrite Manifests3 → 1 manifests1.9s4h agoSUCCESS
raw_clickstreamanalyticsmarketing_eventsCompact Data Files970 → 87 files9m 31.6s5h agoSUCCESS
user_sessionsanalyticsmarketing_eventsRemove Orphan Files1,203 files, 847 MB1m 12s5h agoSUCCESS
product_catalogproductsecommerce_prodCompact Data Files3,008 → 1,256 files6m 11.3s6h agoSUCCESS
user_sessionsanalyticsmarketing_eventsRewrite Manifests2 → 1 manifests1.8s7h agoSUCCESS
inventory_levelsoperationswarehouse_analyticsRemove Orphan Files4,218 files, 1.9 GB3m 44s7h agoSUCCESS
inventory_levelsoperationswarehouse_analyticsExpire Snapshots12 snapshots expired2.0s8h agoSUCCESS
shipping_eventslogisticswarehouse_analyticsRewrite Manifests3 → 1 manifests1.0s8h agoSUCCESS

08 · Every run on record

See what every compaction run did

Every compaction lands in Events, however it started: a policy, Adaptive Maintenance, Execute, the REST API, or MCP. Each run shows the table, files in and out, duration, and status, so you can see the effect of compaction on every table.
  • Submitted, Running, Success, or Failed for every operation
  • Filter by catalog, namespace, operation type, or status, and search by table
  • Lake-wide history in one place, not scattered across Spark logs

Connect in minutes, with no lock-in

1

Connect catalogs & engines

LakeOps reads your Iceberg metadata. Data stays in your storage.

Apache Iceberg
AWS
Snowflake
DuckDB
2

Get visibility & insights

Every table's health and what it needs, from the first scan.

Health for every table
Optimization opportunities
Cost & performance insights
3

Choose your mode

Autopilot, on-demand runs, or your own policies.

Autopilot
Manual
Policies
4

Lakehouse optimized

Queries 12× faster
Cost down 76%
Engines optimized
Agents governed
Tables healthy
Fully governed
Sign upSet up in 10 minutes · Works with your existing stack

The challenge

Small files are cheap to write and expensive to read

Every engine that reads a fragmented table pays for it on every query: more files to open, more data to scan, more storage requests.

Every commit adds small files

A stream that commits every 30 seconds makes 2,880 commits a day, each writing files far below the 128–512 MB that engines read best.

Cron compacts the wrong tables

Nightly jobs rewrite tables that were already healthy and leave busy ones fragmented until the next run.

Spark clusters for a narrow job

Compaction is read, merge, write. Spark adds clusters to size, JVMs to tune, and out-of-memory failures on terabyte tables.

Bigger files aren't faster files

Bin-packing fixes the file count, but unsorted rows give every file wide min/max ranges, so engines still read most of them.

Compare

How teams compact Iceberg tables today

Managed optimizers work inside one platform, and Spark jobs work until the lake grows. LakeOps compacts across your catalogs, in place, on a faster engine.

CapabilitySpark rewrite_data_files + cronAWS Glue compaction optimizerAmazon S3 TablesLakeOps
Where it worksAny catalog, if you write and run the jobsTables in the AWS Glue Data CatalogTables in S3 table bucketsAWS Glue, S3 Tables, and any Iceberg REST catalog (Polaris, Nessie, and more), in place
When it runsOn the schedule you set, whether or not a table needs itAutomatically, per table, once enabledAutomatically, managed by S3When each table's file signals say it's due, or inside your cron window
How files are laid outBinpack, sort, or z-order on columns you chooseBinpack, sort, or z-order on the table's sort orderBinpack, sort, or z-order on the table's sort orderBinpack, or sort by the columns your queries filter, join, and group on
EngineYour Spark clusters: 1,612s for 200 GBAWS-managed, billed in DPU-hoursAWS-managed: 6,300s for 200 GBRust on Apache DataFusion: 221s for 200 GB
Cost to compactSpark cluster compute, plus idle cluster timePer DPU-hour of each runPer object and per GB processedAbout 90% less compute than Spark, with no cluster to run
VisibilityLogs and dashboards you buildRun history per optimizerMaintenance status per tableThe signals behind each run, and files in and out for every run in Events

Benchmark: binpack compaction of a 200 GB, 600M-row Parquet table with the same target file size. AWS Glue and Amazon S3 Tables details are from public AWS documentation, November 2026.

Results

Cut costs and boost performance

Benchmarks from production-grade tables across multiple engines and clouds.

Query speed

12×faster

After compaction + layout optimization

CPU reduction

76%less compute

Compute hours across all engines

Storage saved

56%reclaimed

Orphans, snapshots & bloat removed

Table health

100%healthy

Autonomous maintenance keeps every table optimized

TPC-DS benchmark suiteProduction Iceberg tablesMulti-cloud, multi-engine

See it in action

Watch how LakeOps keeps Iceberg tables fast

Compaction and the rest of table maintenance, run when each table needs it.

Watch demoYouTube ↗

FAQ

Iceberg compaction, answered

Why do Iceberg tables need compaction?

Streaming and frequent small commits leave tables with thousands of small files. Every file adds a storage request, metadata to plan over, and work for the engine, so queries slow down and cost more. Compaction merges small files into files near the target size, so engines open fewer files and read less data.

When should you compact an Iceberg table?

When a meaningful share of its files are well below the target size, or delete files are piling up. LakeOps measures the share of small files, compactable bytes, and delete files on every scan. In Automatic mode it compacts when those signals cross a threshold; in Scheduled mode it compacts inside your cron window, only when it's due.

Bin-pack or sort: which compaction strategy should I use?

Bin-pack merges small files to the target size without reordering rows. It's the fastest fix for small-file pressure and the default. Sort rewrites files in the table's sort order, so engines skip more files on filtered queries. Use it on large, read-heavy tables. When a run doesn't specify a strategy, LakeOps sorts if the table has a sort order and bin-packs otherwise. The default target is the table's write.target-file-size-bytes, or 512 MB.

What is query-aware compaction?

Query-aware compaction looks at which columns your queries filter, join, and group on, then sorts data files to match. Rows with nearby values land in the same files, so column statistics are tight and engines skip whole files instead of scanning them.

How is LakeOps compaction different from Spark rewrite_data_files?

LakeOps runs compaction on a purpose-built Rust engine on Apache DataFusion instead of Spark: no cluster to size, no JVM to tune. In a 200 GB benchmark it finished in 221 seconds versus 1,612 for Spark, about 95% faster and 90% cheaper. LakeOps also decides when each table needs compacting, so there's no job to schedule.

Does compaction block readers or writers?

No. LakeOps writes the new files to your bucket and commits them as a new Iceberg snapshot. Readers see either the old files or the new ones, never a mix, and writers keep committing.

Does LakeOps copy or move my data?

No. LakeOps reads Iceberg metadata from your catalog, reads only the files it rewrites, writes the compacted files to your own bucket, and commits through your catalog. Your data never leaves your storage.

Connect a catalog. Watch your tables compact.

No Spark jobs to write. See which tables need compaction, and what it saves.