Iceberg Maintenance at 12-Second Commits: A 24-Hour Test

#Apache Iceberg#Iceberg maintenance#compaction#snapshot expiry#data freshness#streaming ingest#Amazon S3#DuckDB#PyIceberg#time-series database#Arc
Cover image for Iceberg Maintenance at 12-Second Commits: A 24-Hour Test

Unless one vendor's cloud runs both, writing to Apache Iceberg and keeping an Iceberg table healthy are sold as two jobs. One thing streams rows into the table. Something else compacts the small files, expires old snapshots and deletes what nobody references any more:

The writer makes the mess. Something else is scheduled to clean it up.

Arc does both in one process. The same binary that publishes a measurement as an Iceberg table also compacts it, expires its snapshots, merges its manifests and deletes the metadata nothing reaches. So we wanted to know what that's worth at the speed people now ask for: a commit every 12 seconds, for a full day.

We fed the same rows to three tables for 24 hours and read them from the outside with DuckDB. One was Arc. One was a writer with no maintenance at all. After a day, Arc's table had 37 snapshots at most and answered a one-hour aggregate in 1.2 seconds. The other had 6,496 snapshots, took 55 seconds for the same query, and could no longer commit every 12 seconds.

How fresh is fresh Iceberg?

Here is what the people selling streaming ingest into Iceberg document. These are their published settings, not our measurements; only the Arc row is measured, in the test below. Databricks' Zerobus Ingest, at about 5 seconds, writes Delta tables, so it isn't in the table.

OptionDocumented freshnessReadable byRuns whereTable maintenance
Snowpipe Streaming into Snowflake-managed Iceberg30 s by default. The newer architecture quotes as low as 5 s inside Snowflake and 30 s for other engines.Snowflake; other engines through Snowflake's catalogSnowflakeSnowflake compacts
Confluent TableflowAbout every 5 minAny Iceberg engineConfluent Cloud onlyBuilt in
MSK Express streaming tables5 to 15 min, 10 by defaultAny engine, through S3 TablesAWSInline compaction, plus S3 Tables maintenance
Kinesis streaming tables5 to 15 min, 5 by defaultAny engine, through S3 TablesAWSInline compaction, plus S3 Tables maintenance
Redpanda Iceberg Topics1 min target lag by defaultAny Iceberg engineSelf-hosted or Redpanda CloudLeft to your catalog or your own jobs
Kafka Connect Iceberg sinkCommits every 5 min by defaultAny Iceberg engineSelf-hostedLeft to you
Tiger Lake (Timescale)No figure published; "eventually consistent"Any engine, through S3 Tables or a REST catalogTiger Cloud only, on AWS or AzurePrunes snapshots above 2,500
ArcMeasured: a reader saw data a median of 10 s old (90th percentile 15 s), with the export interval set to 12 s. The default is 60 s and the lowest is 5 s, on a standalone node; a cluster node exports every 5 min.Any Iceberg engine, through Glue, Arc's REST catalog or the table directoryWherever you run Arc: your bucket on S3-compatible storage, or local diskBuilt in, on whenever the export is

Freshness and maintenance pull in opposite directions. Commit more often and you make more snapshots, more manifests and smaller files, which is why the managed options either commit every few minutes or come with a maintenance service attached. Twelve-second commits are only sustainable if something keeps up with the mess they make. That's what we measured.

Why fast commits need maintenance

Every Iceberg commit adds a snapshot, a manifest list, at least one manifest file and a new metadata.json. Readers start from metadata.json and walk down. At one commit every 12 seconds, that's 7,200 commits a day, per table.

Left alone, three things grow:

  • Snapshots. Each one stays in metadata.json, so the file every reader opens first gets bigger with every commit.
  • Manifests. A writer that appends a new manifest per commit, which is the cheapest way to commit, leaves a query planner more of them to read every time.
  • Small files. Twelve seconds of data is a small Parquet file. A day of them is thousands.

Iceberg has an answer for each: compaction, snapshot expiry, manifest rewriting and orphan file removal. The question is who runs them, and when.

The test: three tables, the same rows, 24 hours

We wrote Telegraf-style metrics (CPU, memory and disk for 150 hosts) at a fixed 1,050 rows a second, for 24 hours. That's 91 million rows. The same rows went to three Iceberg tables per measurement, in one S3 bucket in us-east-1:

TableWriterCommits
Arc, 12 sArc with the Iceberg export enabled, everything else at its defaults except the export interval, set to 12 seconds (the default is 60)every 12 s
No maintenanceA PyIceberg writer appending the same Parquet files Arc flushed, with no compaction, no snapshot expiry, no manifest merging and no cleanup. Every PyIceberg setting left at its default.every 12 s, if it can keep up
Arc, 3 minArc with the export interval set to 180 secondsevery 3 min

Arc ran from its main branch, which ships as Arc 27.01.1 in early January. Everything ran on one AWS m7g.xlarge. Arc ran as a single standalone node. Every hour we timed the same query from a fresh DuckDB 2.0.1 process: a per-host aggregate over the last complete hour of the cpu table. Nothing was cached between runs.

This is a first-party test, on our own cloud account. The harness is open source, and running it against your own workload will tell you more than our numbers.

Result 1: 37 snapshots against 6,496

Line chart of snapshots in the cpu table over 24 hours. The writer with no maintenance climbs steadily to 6,496 snapshots. Arc's table stays flat along the bottom of the chart and never goes above 37.
Snapshots in the cpu table. Arc's line is the one along the bottom.

The table with no maintenance kept every snapshot it ever made: 6,496 on the cpu table after a day. Its current metadata.json had grown to 4.3 MB, and every one of the 6,496 commits wrote a new one next to the old ones. Across the three measurements, that table's metadata reached 44 GB on S3. Its data was 3.2 GB.

Arc's table never had more than 37 snapshots. Arc keeps 10, and every 5 minutes it expires the rest. In between, the 12-second appends add about 25 more. When compaction removes files, Arc expires every older snapshot at once, so the count drops to one. Arc's metadata for all three measurements stayed at about 21 MB from the first hour to the last.

Result 2: the same query, 1.2 seconds against 55

Line chart of the cold one-hour aggregate time, hour by hour. Arc stays flat at about 1.2 seconds for 24 hours. The writer with no maintenance rises from about 6 seconds in the first full hour to 55 seconds.
The same per-host aggregate over the last complete hour, cold, from a fresh DuckDB process.

At hour 24, DuckDB answered the one-hour aggregate in 1.24 seconds on Arc's table and in 54.6 seconds on the table with no maintenance. Both counted exactly 2,160,000 rows: one hour of data, all of it.

The hour we queried was too recent for compaction, so on both tables it was the same data: about 610 small files. What differed is how DuckDB found them. Arc's table listed them in a handful of manifests. The other spread them over about 6,500, one per commit, and they all had to be read before any data. We didn't profile DuckDB's planner, but that's the one difference between the two tables for that hour.

Once ingest stopped, we ran a final round by hand with the same query script, three times each, with nothing else on the machine. An hour that Arc had already compacted took 0.35 seconds on Arc and 55 seconds on the other table. A scan of the whole day took 4.0 seconds on Arc and 81.5 seconds on the other. The last complete hour took 0.34 seconds on Arc, against 1.24 during the run, so sharing the machine with the writers made Arc's hourly numbers slower, not faster.

Result 3: without maintenance, 12-second commits stop being possible

Line chart of the median commit time of the writer with no maintenance, hour by hour, against a dashed line at 12 seconds. It starts at 1 second, reaches 12 seconds around hour 15 and ends at 17 seconds.
Median commit time of the writer with no maintenance. The dashed line is the 12-second interval it was asked to keep.

We didn't plan for this one. Every commit rewrites a metadata.json and a manifest list that grow with every commit, so each commit takes longer than the one before. The writer with no maintenance started at 1 second per commit. In hour 13 its slowest commits first took longer than 12 seconds. By hour 15 its typical one did. At the end it took 17 seconds per commit, and it managed 190 commits an hour per table instead of 300.

So without maintenance, the 12-second freshness you configured doesn't last a day. Arc held about 300 commits an hour per table for all 24 hours.

The exact break point belongs to this writer and this setup. PyIceberg is Python and commits with a fast append. Its three tables committed from one Python process, its timing includes loading the table (parsing that growing metadata.json), and it shared four vCPUs with both Arcs and the hourly queries. A JVM writer on its own machine would get there later. But the cost of a commit grows with every commit unless something prunes the history, whatever the writer.

The numbers at hour 24

Arc, 12 sNo maintenance, 12 sArc, 3 min
Snapshots in the cpu table24 (37 at most)6,49610
Manifests in the current snapshot2 to 66,4963 to 5
Live data files in the cpu tableabout 1,475about 14,750about 1,475
Average data file in the cpu tableabout 640 KBabout 130 KBabout 640 KB
Iceberg metadata on S3, all tables21 MB44 GB5 MB
Everything on S3, all tables1.83 GB47.6 GB1.81 GB
Table versions per table, last hourabout 296about 190about 45
One-hour aggregate, cold1.24 s54.6 s1.25 s

Table versions include Arc's expiry and compaction commits; the 3-minute table publishes more than 20 an hour for that reason.

Rows were exact. Every query over a full hour counted 2,160,000 rows on all three tables, compacted or not. An outside reader counted the most recent hour of each cpu table every 30 seconds without an error: 2,891 times on each Arc table and 2,438 on the other, whose reads took longer.

What Arc does, and when

These are the defaults. Once the Iceberg export is enabled (iceberg.enabled = true), you don't turn any of them on.

JobWhat Arc doesDefault
CompactionMerges an hour's small files once the hour's newest file is an hour old, then merges each day's filesHourly at :05, daily at 03:00
Snapshot expiryKeeps the 10 newest snapshots. A pass that removes a file expires every older one, because those snapshots name files Arc has deleted.Every 5 minutes (iceberg.retain_snapshots = 10)
Manifest mergingMerges small manifests as it appends, once there are 4, and collapses a table with 12 or more data manifests into oneOn every append and every pass
Metadata cleanupDeletes manifests and manifest lists that no kept metadata.json reaches, once the file is at least an hour oldEvery pass (iceberg.orphan_sweep_enabled = true)
Old table versionsKeeps recent metadata.json versions for at least 5 minutes, so a reader holding one can finishiceberg.min_version_age = 300

What about orphan data files? Arc's data files are its own. Compaction writes the merged file and deletes the small ones itself, then asks for a pass that drops them from the table, within seconds. No snapshot outlives the files it names, so expiry never leaves data files behind. Over the 24 hours, the check we ran every 15 minutes never found a named file missing from S3, or a data file on S3 older than 10 minutes that the table didn't name. Younger ones are files Arc had written and not yet published.

One writer, maintenance included

Most of the work in a separate maintenance service isn't compacting. It's coordinating with a writer it doesn't control.

A compaction job and a streaming writer commit to the same table at the same time. Iceberg's optimistic concurrency keeps the table correct, but under contention one of them has to retry, and at a commit every few seconds the writer is always there to contend with. An orphan file cleanup can't know which unreferenced files a writer has just written and is about to commit, so it waits for a safety window, usually days, and storage keeps the difference meanwhile.

When the writer is also the maintainer, those questions have exact answers. Arc knows which files it wrote and which ones compaction just replaced. Expiry, compaction and appends are commits in one sequence, from one process. And the cleanup can delete unreachable metadata once it's an hour old, instead of days, because nothing else writes to that table.

The catch is the same as the benefit: it works because Arc is the only writer. Other engines read Arc's tables; they don't write to them. If you need Spark or Flink writing into the same table, you need a separate maintenance service.

What this test doesn't show

  • 12 seconds isn't Arc's default. The default export interval is 60 seconds. We set 12 seconds to match the other writer's commit rate.
  • Arc's file count isn't near zero. Compaction waits until an hour is an hour old, so about two hours of small files are always live, plus each compacted hour. The daily tier, which merges those, needs 24 hours and didn't run inside this test.
  • The 55 seconds is a fast-append writer's number. PyIceberg doesn't merge manifests by default. Iceberg's Java library, which Flink, Spark and Kafka Connect use, merges them once 100 pile up, so those writers would plan faster. Snapshot count, small files, metadata size and growing commit time are what any writer gets with nothing maintaining the table.
  • No time travel across compaction. On a table Arc is writing to, history is shallow on purpose: when compaction removes files, older snapshots go too.
  • We didn't test the compaction window. A query planned just before a compaction can hit a file compaction has deleted; running it again reads the new snapshot. Our reader only read the most recent hour, which compaction doesn't touch, so this run says nothing about how often that happens.
  • One machine, one workload. Both Arcs, the other writer and DuckDB shared one 4-vCPU instance. The final round, run after ingest stopped, gives the same 55 seconds for the other table and a faster Arc.

Run it yourself

The harness is in Arc's repository under scripts/iceberg-maintenance: the load generator, the no-maintenance writer, the observer that records every table version, the query script, and the scripts that turned the run into hourly numbers and charts. Point it at your own bucket and change the rate.

Arc 27.01.1 ships in early January. The Iceberg export, its settings and how each engine reads it are in the docs: Apache Iceberg.

Ready to handle billion-record workloads?

Deploy Arc in minutes. Own your data in open files on your storage. Use for analytics, observability, AI, IoT, or data warehousing.

Get Started ->