Home / Tools / Parquet vs Iceberg on S3: Compaction Cost Formula with a Worked Example
Interactive Tool

Parquet vs Iceberg on S3: Compaction Cost Formula with a Worked Example

Estimate monthly S3 compaction cost for plain Parquet, self-managed Iceberg on Glue and S3 Tables, using AWS us-east-1 list prices and a worked example.

Parquet vs Iceberg on S3: Compaction Cost Formula with a Worked Example

Small files are the main reason object-store tables get slow and expensive: every file is at least one request to plan, open and read. Compaction rewrites many small files into fewer large ones, and it has its own bill. This page gives the formula for that bill on Amazon S3 for three setups: plain Parquet with a custom rewrite job, Apache Iceberg compacted with Spark on AWS Glue, and Amazon S3 Tables with managed compaction. Prices are AWS us-east-1 list prices from the AWS Price List API as of November 2026. The worked example uses hypothetical inputs; replace them with your own numbers.

What compaction costs are made of

For any of the three setups, the monthly compaction bill splits into five lines:

  1. Read requests to fetch the small input files.
  2. Write requests to upload the compacted output files.
  3. Compute to run the rewrite.
  4. Retained storage: with Iceberg, the old files stay until their snapshots expire.
  5. Managed-service fees, for S3 Tables only: per-object and per-GB compaction charges, object monitoring, and a higher storage rate.

DELETE requests on S3 are free, so cleaning up the old files after compaction adds no request cost.

Unit prices used (us-east-1, list)

Item Price
S3 Standard storage, first 50 TB $0.023 per GB-month
S3 PUT, COPY, POST, LIST $0.005 per 1,000
S3 GET and other requests $0.0004 per 1,000
AWS Glue ETL (standard / Glue 6.0+ / Flex) $0.44 / $0.308 / $0.29 per DPU-hour
AWS Glue Iceberg table optimization (compaction) $0.44 per DPU-hour
S3 Tables storage, first 50 TB $0.0265 per GB-month
S3 Tables compaction, binpack $0.002 per 1,000 objects + $0.005 per GB processed
S3 Tables compaction, sort or z-order $0.002 per 1,000 objects + $0.01 per GB processed
S3 Tables object monitoring $0.025 per 1,000 objects per month
Athena SQL queries $5.00 per TB scanned

The formula

Inputs, per month:

  • D: GB of new data compacted per day; days: days per month (30).
  • s: average input file size in MB; T: target output size in MB. Iceberg’s default write.target-file-size-bytes is 536870912 (512 MB).
  • r: GET requests per input file. Parquet readers usually issue several range requests per file (footer, then column chunks).
  • p: requests per output file. With multipart upload this is the number of parts plus the initiate and complete calls.
  • R: days old files are retained until snapshot expiry. Iceberg’s default history.expire.max-snapshot-age-ms is 5 days.
  • k: compute throughput in GB per DPU-hour. You have to measure this on your own data.

Derived counts:

  • Input files per month: N_in = D x 1024 / s x days
  • Output files per month: N_out = D x 1024 / T x days

Self-managed Iceberg on Glue:

Cost = N_in x r x 0.0004/1000 + N_out x p x 0.005/1000 + (D x days / k) x DPU_price + D x R x 0.023

Plain Parquet with a custom rewrite job drops the retention term if you delete originals immediately, because there are no snapshots to keep. You also lose atomic commits: readers can briefly see both old and new files, or neither.

S3 Tables managed compaction (binpack):

Cost = N_in x 0.002/1000 + D x days x 0.005 + files_in_table x 0.025/1000 + D x R x 0.0265 + table_GB x (0.0265 - 0.023)

The last term is not a compaction fee as such, but it is the price of choosing S3 Tables over a standard bucket, so it belongs in the comparison.

Hosting the dashboard that sits on your lakehouse?

Managed cloud servers for the web app or BI front end, so your team spends its time on tables and queries rather than patching servers.

See managed hosting plans →

Worked example (hypothetical workload)

Assume 200 GB of new data per day, landing as 8 MB Parquet files, compacted to the 512 MB default. Assume 3 GETs per input file, 10 requests per output file, 5-day retention, and a placeholder throughput of 20 GB per DPU-hour. For S3 Tables, assume the table holds 40 TB in 80,000 compacted files.

That gives 768,000 input files and 12,000 output files per month, 6,000 GB processed and 300 DPU-hours.

Line item Plain Parquet + Glue Iceberg + Glue (standard) Iceberg + Glue 6.0+ S3 Tables (binpack)
GET requests (768,000 x 3) $0.92 $0.92 $0.92 included
PUT requests (12,000 x 10) $0.60 $0.60 $0.60 included
Compute (300 DPU-hours) $132.00 $132.00 $92.40 none
Per-object compaction fee none none none $1.54
Per-GB compaction fee (6,000 GB) none none none $30.00
Retained old files (1,000 GB) $0 (deleted at once) $23.00 $23.00 $26.50
Object monitoring (80,000 files) none none none $2.00
Compaction subtotal $133.52 $156.52 $116.92 $60.04
Storage premium on 40 TB table none none none $140.00
Total compared $133.52 $156.52 $116.92 $200.04

The result depends mostly on two numbers. The compute line scales with how fast your job actually compacts, so if real throughput is half the placeholder, the Glue columns roughly double. The S3 Tables storage premium scales with total table size, not with daily ingest, so S3 Tables looks best for large ingest into small tables and worst for large, slow-growing tables. On these inputs, the S3 Tables compaction fees alone are about half the Glue cost, but the storage premium on 40 TB more than cancels the saving.

For context, the ingest itself generated 768,000 small PUTs, about $3.84 a month. The request lines in compaction are small. What compaction mainly saves you is query planning and per-file overhead on the read side.

Tuning knobs that change the bill

  • Target file size. Iceberg’s rewrite_data_files procedure defaults to the table’s 512 MB target. It rewrites files below 75% or above 180% of the target, and any file group with 5 or more files.
  • Partial progress. partial-progress.enabled is off by default. Turning it on lets long rewrites commit in groups, which reduces the work lost to conflicts and retries.
  • Snapshot expiry. Shorter retention reduces the retained-storage line but shortens the time-travel window.
  • Sort or z-order. On S3 Tables this doubles the per-GB fee, to $0.01 per GB. With Glue it costs more compute. Do it only where query pruning pays it back.
  • Glue version. Glue 6.0+ lists $0.308 per DPU-hour against $0.44 for earlier versions, a direct 30% reduction on the compute line.

Pros and cons of each approach

Plain Parquet with a custom job

  • Pro: cheapest storage, no snapshot overhead.
  • Con: no atomic swaps, no time travel, and you maintain the job logic.

Iceberg compacted on Glue or Spark

  • Pro: full control over timing, sort order and cluster size; standard S3 storage price.
  • Con: compute cost depends on job tuning; you schedule snapshot expiry and orphan-file cleanup yourself.

S3 Tables

  • Pro: no compaction jobs to run; fees are predictable per object and per GB.
  • Con: higher storage rate on every GB in the table, plus a per-object monitoring fee.

FAQ

Does compaction reduce Athena costs?

Not much on its own. Athena bills $5.00 per TB scanned, and rewriting files does not change how many bytes a query reads. Sorting and better partition pruning do. Compaction mainly cuts planning time and per-file request overhead.

Why do old files still cost money after compaction in Iceberg?

Earlier snapshots still reference them. They are only removable after snapshot expiry, which defaults to 5 days, followed by orphan-file cleanup.

Where does the 20 GB per DPU-hour figure come from?

It is a placeholder for the example, not a measurement. Run one compaction job on a representative partition, divide GB processed by DPU-hours billed, and use that number.

Are these prices valid outside us-east-1?

No. S3, Glue and S3 Tables prices vary by region. Pull the same line items for your region from the AWS Price List API or pricing pages.

When does S3 Tables win?

When you ingest a lot into a relatively small table, or when the engineering time to run and tune compaction jobs costs more than the storage premium.

Keep the app layer simple while the data layer scales

Managed servers on a choice of underlying clouds, priced by the hour, for the services that read from your tables.

Explore managed servers →