<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Impact of Capturing Streaming Metrics to ADLS on Data Load Performance in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/impact-of-capturing-streaming-metrics-to-adls-on-data-load/m-p/130924#M48944</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/170061"&gt;@saicharandeepb&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The behaviour you're experiencing can happen with coalesce. The thing is, when you use coalesce(1), you're sacrificing parallelism and everything is performed on a single executor.&lt;BR /&gt;&lt;BR /&gt;There's even a warning in Apache Spark OSS regarding this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1757053069172.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19720i604C64882B0E27B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1757053069172.png" alt="szymon_dybczak_0-1757053069172.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can also check following posts/blogs:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/questions/53368343/does-coalesce1-the-dataframe-before-write-have-any-impact-on-performance" target="_blank" rel="noopener"&gt;apache spark - does coalesce(1) the dataframe before write have any impact on performance? - Stack Overflow&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/pulse/analyzing-30x-slowdown-my-spark-program-due-coalesce-ashutosh-patkar-ey0ec/" target="_blank" rel="noopener"&gt;(22) Analyzing a 30x Slowdown in My Spark Program Due to Coalesce | LinkedIn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Sep 2025 06:25:34 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2025-09-05T06:25:34Z</dc:date>
    <item>
      <title>Impact of Capturing Streaming Metrics to ADLS on Data Load Performance</title>
      <link>https://community.databricks.com/t5/data-engineering/impact-of-capturing-streaming-metrics-to-adls-on-data-load/m-p/130920#M48942</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I’m working on capturing Structured Streaming metrics and persisting them to Azure Data Lake Storage (ADLS) for monitoring and logging. To achieve this, I implemented a custom StreamingQueryListener that writes streaming progress data as JSON files using the code snippet below.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image (1).png" style="width: 799px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19719i911D589FC1319B63/image-size/large?v=v2&amp;amp;px=999" role="button" title="image (1).png" alt="image (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To avoid generating multiple small files, I used coalesce(1) to reduce the DataFrame to a single partition so that Spark writes only one output file per batch. While this approach functions as intended, I’ve noticed that writing these metrics—particularly with coalesce(1)—is negatively impacting the overall data load performance.&lt;/P&gt;&lt;P&gt;Has anyone experienced similar performance issues when writing streaming metrics directly to external storage like ADLS?&lt;/P&gt;&lt;P&gt;What are some recommended asynchronous or buffered strategies for capturing and storing streaming metrics without affecting the main data processing workflow?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 05:25:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/impact-of-capturing-streaming-metrics-to-adls-on-data-load/m-p/130920#M48942</guid>
      <dc:creator>saicharandeepb</dc:creator>
      <dc:date>2025-09-05T05:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Impact of Capturing Streaming Metrics to ADLS on Data Load Performance</title>
      <link>https://community.databricks.com/t5/data-engineering/impact-of-capturing-streaming-metrics-to-adls-on-data-load/m-p/130924#M48944</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/170061"&gt;@saicharandeepb&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The behaviour you're experiencing can happen with coalesce. The thing is, when you use coalesce(1), you're sacrificing parallelism and everything is performed on a single executor.&lt;BR /&gt;&lt;BR /&gt;There's even a warning in Apache Spark OSS regarding this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1757053069172.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/19720i604C64882B0E27B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1757053069172.png" alt="szymon_dybczak_0-1757053069172.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can also check following posts/blogs:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stackoverflow.com/questions/53368343/does-coalesce1-the-dataframe-before-write-have-any-impact-on-performance" target="_blank" rel="noopener"&gt;apache spark - does coalesce(1) the dataframe before write have any impact on performance? - Stack Overflow&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/pulse/analyzing-30x-slowdown-my-spark-program-due-coalesce-ashutosh-patkar-ey0ec/" target="_blank" rel="noopener"&gt;(22) Analyzing a 30x Slowdown in My Spark Program Due to Coalesce | LinkedIn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 06:25:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/impact-of-capturing-streaming-metrics-to-adls-on-data-load/m-p/130924#M48944</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-09-05T06:25:34Z</dc:date>
    </item>
  </channel>
</rss>

