Smart Compaction

Compaction that sorts for how you query

Watches production WHERE, JOIN, and GROUP BY columns, then rewrites files to match. Engines skip more data. Runs 95% faster than Spark compaction on the same tables.

95%Faster than Spark
12×Faster queries
76%Cost reduction
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

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

Compaction that learns, simulates, and sequences

Not just file merging — a continuous, query-informed optimization loop running on a Rust engine fast enough to run between writes.

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 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
🧹Orphan File Cleanup
Last: 7 hours agoNext: in 17h
15%
No orphan files detected in current scan window

Adaptive Intelligence

Knows when each table needs compaction — and what kind

LakeOps continuously monitors every table: file count, average file size vs target, small-file ratio, delete-file accumulation, manifest depth, and write velocity. Each table is classified as Healthy, Warning, or Critical. Compaction fires only when a table crosses a health threshold — and the most degraded tables run first. The full maintenance pipeline is sequenced automatically: snapshot expiry before compaction (so you never rewrite files about to be GC’d), then orphan cleanup, then manifest rewrite.

  • Streaming tables compact multiple times per hour, batch tables daily, healthy tables are skipped
  • Priority ordering — worst-degraded tables first, not first-in-first-out
  • Sequenced with expiry, cleanup, and manifest rewrite — each step’s output is the next step’s clean input
Engine Benchmark200 GB
Same hardware

Binpack compaction · 200 GB / 600M rows

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

Production tables

balance_snapshots1,192 GB11,957\u21923,270
raw_sdk_events8 GB42,633\u219269
cluster_registry322 GB878\u2192400

95%

Faster

90%

Cheaper

0

OOM risk

0

Clusters

Rust + DataFusion

95% faster and 90% cheaper than Spark — on the same tables

Compaction is a narrow, I/O-bound read-merge-write operation. Spark runs it on a general-purpose distributed engine with JVM overhead, GC pauses, and OOM risk. LakeOps replaces that with a purpose-built Rust engine powered by Apache DataFusion: zero-copy Arrow columnar pipeline, bounded memory with disk spill, lock-free parallelism — no cluster to provision, no executor to tune. The engine learns from each run, so consecutive passes get faster without any configuration changes.

  • 200 GB in 221s vs Spark 1,612s — peak throughput 2,522 MB/s
  • Bounded memory — a 1.2 TB table that OOM’d Spark finishes in 11 min, $5/TB vs $50/TB
  • Self-improving planner — same table: 22 min → 11 min across runs, 925 → 1,572 MB/s
Compaction EngineQuery-Aware
Rust + DataFusion
Detected Access Patterns— 2,847 queries · 3 engines
WHEREcustomer_id
89%
WHEREevent_date
76%
JOINproduct_id
64%
GROUPregion
51%
Sort Optimization Applied

Before

Files970
Sortappend order

After

Files87
Sortcustomer_id, date

12×

Faster queries

76%

Less CPU

95%

vs Spark

90%

Cheaper ops

Query-Aware Sort

Sort files by the columns your queries actually use

Most compaction tools just merge small files. LakeOps collects WHERE, JOIN, and GROUP BY column frequency from every connected engine — Trino, Spark, Snowflake, Athena, DuckDB — then physically re-sorts data files so Parquet min/max pruning skips entire file groups. The sort order adapts as query patterns evolve.

  • Cross-engine telemetry — learns from every engine, not just one
  • 12× faster queries from sort optimization alone, zero SQL changes
  • Self-adapting — sort order updates when new dashboards or agents change access patterns
Layout SimulationsBranch-based
3 strategies tested
customer_orders— comparing sort strategies
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%

Scan reduction

12.4×

Query speedup

0

Production risk

Layout Simulations

Test sort strategies on a branch before production

Not sure whether sorting by event_date or customer_id helps more? LakeOps runs layout simulations on Iceberg branches — testing sort orders against real query patterns without touching production. Compare scan reduction, file layout, and estimated speedup side by side, then apply the winner.

  • Branch-based — production tables stay untouched during testing
  • Replays actual production queries against baseline vs candidate
  • Eliminates the risk of guessing sort order on terabyte rewrites
Delete ResolutionDuring Compaction
Resolved

Before

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

After

Data files94
Position deletes0
Equality deletes0
MoR overhead0ms
Position deletes applied847 delete files → 012s ago
Equality deletes rewritten63 delete files → 014s ago
Storage reclaimed2.1 GB from resolved deletes14s ago

Delete Resolution

Delete files resolved during compaction — not after

Merge-on-read tables accumulate position and equality delete files that engines must reconcile at query time. LakeOps physically applies deletes during the compaction pass — eliminating delete files, reclaiming storage, and restoring read performance in one operation.

  • Position and equality deletes rewritten in the same compaction pass
  • CDC and streaming tables stop paying the merge-on-read tax
  • Iceberg V3 deletion vectors (Roaring bitmaps) supported natively

Benchmarks

Why not just use Spark cron-jobs?

Spark was built for batch ETL, not continuous table maintenance. Same data, same hardware — different results.

MetricSparkS3 TablesLakeOps
200 GB compaction1,612s6,300s221s
Peak throughput~350 MB/s~32 MB/s2,522 MB/s
Memory modelJVM heapManagedBounded (no OOM)
Query-aware sortManualNoAutomatic
Trigger modelCronBackgroundEvents + policies
InfrastructureClusterManagedServerless

200 GB / 600M rows, Parquet, partitioned by date. Same hardware, same data, same target file size.

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

Compaction Results

5.5 TB compacted — real tables, real results

LakeOps Rust engine compacting batch, streaming, delete-heavy, and multi-writer Iceberg tables. Same hardware, same target file size — no Spark, no JVM, no OOM.

101K → 19K
Files after compaction (81%)
2,522 MB/s
Peak compaction throughput
95%
Faster than Spark compaction
Faster queries after compaction
TableSizeWorkloadFiles (B → A)ThroughputTime
balance_snapshots1,192 GBTB-Scale batch11,9573,2701,572 MB/s11 min
events_analytics484 GBDelete-Heavy16,1287,198729 MB/s11m 21s
raw_sdk_events8 GBStreaming42,63369167 MB/s138s
site_traffic292 GBMulti-Writer2,7407541,465 MB/s3m 25s

Compaction speed

200 GB benchmark (seconds)

LakeOps221s
Spark1,612s

95% faster

Cost per TB

Normalized to Spark = 100%

LakeOps$5/TB
Spark$50/TB

90% cheaper

Query time

Avg. query latency after compaction

After1.5s
Before12.1s

8x faster queries

Connect in minutes
- no vendor lock-in

1

Connect catalogs & engines

Only metadata is processed — never retained or stored.

Apache Iceberg
AWS
Snowflake
DuckDB
2

Get visibility & insights

Telemetry reveals table health and actions needed.

Table health scores
Optimization opportunities
Cost & performance insights
3

Choose your mode

Autopilot, manual approval, or policy-driven.

Autopilot
Manual
Policies
4

Lakehouse optimized

Queries 10x faster
Cost down 76%
Engines optimized
AIs managed
Tables healthy
Fully governed
Set up in 10 minutes · Works with your existing stack
Enterprise-grade

Built for enterprisegrade data lakes

SOC 2, SSO, RBAC, dedicated support, and the scale your largest Iceberg lakes demand.

Security & compliance

SOC 2 Type II, encryption, SSO/RBAC, and audit trails for regulated teams.

Scale & control

One control plane for your full lake. Real-time visibility, policies, and predictable performance.

Support & training

Dedicated onboarding, training, and enterprise SLAs. Deploy in VPC or on-prem.

See compaction in action
on your own tables.

Connect your catalog and get a free compaction analysis in 10 minutes.