Skip to content
aiqbench takeAI Products

aiqbench analysis

Migrating Spark workloads to Kubernetes requires careful validation of storage semantics and scheduling rules, as compound misconfigurations like RAM-backed scratch directories combined with hard pod affinity can trigger catastrophic OOM failures that mimic standard tuning issues. These infrastructure-level interactions often remain invisible to standard diagnostics until production-scale load exposes the memory exhaustion on a single node. Teams should explicitly audit storage profiles and executor placement strategies before promoting migrated pipelines to production to avoid misdiagnosing root causes.
Source coveringInfoQ
What this isA model's reading of the article and related coverage, written for aiqbench. Not the publisher's words.

Article: Two Misconfigurations That Caused Spark OOM Failures on Kubernetes

InfoQ14 min read

After migrating Spark pipelines to Azure Kubernetes Service, two infrastructure settings interacted destructively: spark.kubernetes.local.dirs.tmpfs=true backed shuffle spill with RAM instead of disk, and a hard podAffinity rule forced all executors onto one node. Together, they caused repeated OOM kills invisible to standard diagnostics. By Pranav Bhasker

Setting spark.kubernetes.local.dirs.tmpfs=true backs all scratch directories with node RAM, including shuffle spill, which can exhaust node memory within seconds during shuffle-heavy stages. A hard podAffinity rule that forces executor co-location concentrates shuffle-time memory pressure on a single node, which can trigger catastrophic out of memory (OOM) failures during shuffle-heavy stages. A one gibibyte (1Gi) scratch volume limit is insufficient for any shuffle-heavy job: size tmp-volume and workdir against your actual production shuffle data profile. Compound infrastructure misconfigurations often only surface under production-scale load and are easily misdiagnosed as Spark tuning problems like heap undersizing or data skew. Shortly after migrating several Spark batch pipelines from on-premises infrastructure to Azure Kubernetes Service (AKS), we began seeing repeated executor OOM failures in one of our larger jobs. The failures appeared during shuffle stages and initially looked like a typical Spark memory tuning problem. Executor memory was increased, executor counts were adjusted, and the job was restarted multiple times. None of these changes helped. The puzzling part was that the pipeline had been stable for years before the migration. The eventual root cause was not a Spark configuration issue at all. Instead, two infrastructure-level settings introduced during the migration interacted in an unexpected…

Excerpt shown under the publisher's RSS terms · 200 words · full text and figures are on the publisher's site

Related coverage