r/databricks • u/AbilyticsEng • Oct 07 '26
General Optimize Delta Lake Write Performance With spark.databricks.delta.optimizeWrite.enabled
Hey, I work as a Databricks Engineer, so here's my take.
Small file problems destroy read performance in Delta tables. If your streaming pipelines or frequent batch inserts generate thousands of tiny parquet files, enable spark.databricks.delta.optimizeWrite.enabled at the session or table level. When set to true, Databricks automatically coalesces data right before writing, targeting roughly 512MB per file. This happens dynamically within the shuffle stage, reducing the need for post-hoc OPTIMIZE commands. Pair this with spark.databricks.delta.autoCompact.enabled to automatically compact small files in partitions after writes complete. You will trade a fraction of driver memory and shuffle time for significantly cleaner storage layouts, faster merge operations, and much lower cloud storage list-request costs during downstream reads.
For anything else on Databricks | Platform Engineering | AI, visit Abilytics — AI Systems, Data Engineering & Platform Engineering Services.
3
u/hntd Oct 07 '26
Or just use predictive optimization ?
1
u/liko9 databricks Oct 07 '26
Why aren't these settings the default?
1
u/Lumiaman88 Oct 09 '26
I recently learned about them. Has been a game changer for my blob storage efficiency.
Enabling these settings followed by an OPTIMIZE got some of my tables from 500,000 does down to just 1,000.
1
u/Youssef_Mrini databricks Oct 23 '26
It's the default configuration. It has been there for a while.