Skip to content

See where a Spark run spent its time, and what it cost.

Ilum runs Spark as jobs, services and schedules on your Kubernetes cluster. With tracing on, every run gets a Trace tab with its spans and logs, and a Cost tab with what it used.

Every span.
One time axis.

One slow run: 1,512 spans over 12 min 37 s

0:00 / 0:19
  1. Slow run1,512 spans
  2. Critical pathpod.scheduled
  3. Disk spillspark.stage:2.0
  4. Inspector160 MiB spilled

Take one slow run apart.

Two runs of card-merchant-affinity on the cluster prod-batch, their spans on one time axis. Follow the steps, or pick any span to read what the driver logged while it ran and its attributes.

  1. 1SlowThe run took 12 min 37 s, 1,512 spans.
  2. 2WhereThe driver waited 5 min 54 s for a node, then job 1 took 4 min 4 s.
  3. 3WhyStage 2 spilled 160 MiB. Task 31 ran 84.0 s, the median 2.5 s.
  4. 4FixSalt the hot key over 32 values before the shuffle..repartition(48, "affinity_key", "salt")
  5. 5Next runStage 2 took 50.2 s, its slowest task 4.7 s, no spill. Executors worked 3 min 59 s, not 7 min 45 s.
Run

ilum.spark-submitilum-service

starts +0:00, lasts 256 ms

ilum.role=apiservice.name=ilum-core

Driver log while it ran

The driver was not running yet.

pod.scheduleddriver pod

starts +1:01, lasts 5 min 54 s

ilum.role=k8sservice.name=ilum-k8s-event-otel

Driver log while it ran

The driver was not running yet.

Attributes

k8s.pod.role
driver

pod.runningdriver pod

starts +6:56, lasts 5 min 41 s

ilum.role=k8sservice.name=ilum-k8s-event-otel

Driver log while it ran4 of 707 lines

  1. WARN NativeCodeLoader Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 14807 ms on 10.42.0.197 (executor 1) (2/64)
  3. INFO TaskSetManager Finished task 31.0 in stage 2.0 (TID 185) in 84020 ms on 10.42.0.197 (executor 1) (48/48)
  4. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 242 ms

Attributes

k8s.pod.role
driver

spark.applicationSpark driver

starts +7:10, lasts 5 min 24 s

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran4 of 670 lines

  1. WARN SparkConf Note that spark.local.dir will be overridden by the value set by the cluster manager (via SPARK_LOCAL_DIRS in standalone/kubernetes and LOCAL_DIRS in YARN).
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 14807 ms on 10.42.0.197 (executor 1) (2/64)
  3. INFO TaskSetManager Finished task 31.0 in stage 2.0 (TID 185) in 84020 ms on 10.42.0.197 (executor 1) (48/48)
  4. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 242 ms

pod.runningexecutor pod

starts +7:17, lasts 5 min 19 s ERROR

ilum.role=k8sservice.name=ilum-k8s-event-otel

Driver log while it ran4 of 630 lines

  1. WARN SparkSession Using an existing Spark session; only runtime SQL configurations will take effect.
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 14807 ms on 10.42.0.197 (executor 1) (2/64)
  3. INFO TaskSetManager Finished task 31.0 in stage 2.0 (TID 185) in 84020 ms on 10.42.0.197 (executor 1) (48/48)
  4. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 242 ms

Attributes

k8s.pod.role
executor

spark.query:merchant_affinity_stagingSpark SQL query

starts +7:53, lasts 4 min 38 s

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 483 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 14807 ms on 10.42.0.197 (executor 1) (2/64)
  2. INFO TaskSetManager Finished task 31.0 in stage 2.0 (TID 185) in 84020 ms on 10.42.0.197 (executor 1) (48/48)
  3. INFO DAGScheduler ResultStage 2 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 131514 ms

spark.job:0Spark job

starts +7:54, lasts 16.6 s

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 194 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 0.0 (TID 0) in 7593 ms on 10.42.0.197 (executor 1) (1/90)
  2. INFO TaskSetManager Finished task 1.0 in stage 0.0 (TID 1) in 7569 ms on 10.42.0.197 (executor 1) (2/90)
  3. INFO DAGScheduler ResultStage 0 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 16526 ms

Attributes

spark.job.id
0

spark.stage:0.0Spark stage

starts +7:54, lasts 16.5 s

ilum.role=driverservice.name=ilum-spark-job

90 tasks, by time

slowest: task 0, 7.6 s, 0 B of shuffle read, 0% of the rows

Driver log while it ran3 of 187 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 0.0 (TID 0) in 7593 ms on 10.42.0.197 (executor 1) (1/90)
  2. INFO TaskSetManager Finished task 1.0 in stage 0.0 (TID 1) in 7569 ms on 10.42.0.197 (executor 1) (2/90)
  3. INFO DAGScheduler ResultStage 0 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 16526 ms

Attributes

spark.stage.id
0
spark.stage.job_id
0
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
1960319.6 s
spark.stage.input.bytes_read
0
spark.stage.shuffle.read.bytes_local
0
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
0
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
302302 ms

spark.job:1Spark job

starts +8:11, lasts 4 min 4 s

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 255 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 14807 ms on 10.42.0.197 (executor 1) (2/64)
  2. INFO TaskSetManager Finished task 31.0 in stage 2.0 (TID 185) in 84020 ms on 10.42.0.197 (executor 1) (48/48)
  3. INFO DAGScheduler ResultStage 2 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 131514 ms

Attributes

spark.job.id
1

spark.stage:1.0Spark stage

starts +8:11, lasts 1 min 53 s

ilum.role=driverservice.name=ilum-spark-job

64 tasks, by time

slowest: task 1, 14.8 s, 0 B of shuffle read, 0% of the rows

Driver log while it ran3 of 137 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 14799 ms on 10.42.0.197 (executor 1) (1/64)
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 14807 ms on 10.42.0.197 (executor 1) (2/64)
  3. INFO DAGScheduler ShuffleMapStage 1 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 112591 ms

Attributes

spark.stage.id
1
spark.stage.job_id
1
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
2191493 min 39 s
spark.stage.input.bytes_read
90393608.6 MiB
spark.stage.shuffle.read.bytes_local
0
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
687486966656 MiB
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
21522.2 s

spark.stage:2.0Spark stage

starts +10:04, lasts 2 min 12 s

ilum.role=driverservice.name=ilum-spark-job

48 tasks, by time

slowest: task 31, 84.0 s, 294 MiB of shuffle read, 49% of the rows

Driver log while it ran3 of 106 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 2.0 (TID 154) in 8987 ms on 10.42.0.197 (executor 1) (1/48)
  2. INFO TaskSetManager Finished task 31.0 in stage 2.0 (TID 185) in 84020 ms on 10.42.0.197 (executor 1) (48/48)
  3. INFO DAGScheduler ResultStage 2 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 131514 ms

Attributes

spark.stage.id
2
spark.stage.job_id
1
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
2224833 min 42 s
spark.stage.input.bytes_read
0
spark.stage.shuffle.read.bytes_local
687486966656 MiB
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
0
spark.stage.output.bytes_written
317440908303 MiB
spark.stage.spill.disk_bytes
167657900160 MiB
spark.stage.jvm_gc_time_ms
998998 ms

spark.query:AggregateSpark SQL query

starts +12:31, lasts 2.8 s

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 56 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 3.0 (TID 203) in 1479 ms on 10.42.0.197 (executor 1) (2/4)
  2. INFO TaskSetManager Finished task 2.0 in stage 3.0 (TID 204) in 1060 ms on 10.42.0.197 (executor 1) (3/4)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 242 ms

spark.job:2Spark job

starts +12:31, lasts 2.6 s

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 40 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 3.0 (TID 203) in 1479 ms on 10.42.0.197 (executor 1) (2/4)
  2. INFO TaskSetManager Finished task 2.0 in stage 3.0 (TID 204) in 1060 ms on 10.42.0.197 (executor 1) (3/4)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 242 ms

Attributes

spark.job.id
2

spark.stage:3.0Spark stage

starts +12:31, lasts 2.3 s

ilum.role=driverservice.name=ilum-spark-job

4 tasks, by time

slowest: task 1, 1.5 s, median 943 ms

Driver log while it ran3 of 15 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 3.0 (TID 203) in 1479 ms on 10.42.0.197 (executor 1) (2/4)
  2. INFO TaskSetManager Finished task 2.0 in stage 3.0 (TID 204) in 1060 ms on 10.42.0.197 (executor 1) (3/4)
  3. INFO DAGScheduler ShuffleMapStage 3 (count at NativeMethodAccessorImpl.java:0) finished in 2316 ms

Attributes

spark.stage.id
3
spark.stage.job_id
2
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
36193.6 s
spark.stage.input.bytes_read
7278371.1 KiB
spark.stage.shuffle.read.bytes_local
0
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
236236 B
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
194194 ms

spark.stage:4.0Spark stage

starts +12:34, lasts 242 ms

ilum.role=driverservice.name=ilum-spark-job

1 tasks, by time

slowest: task 0, 236 ms, median 236 ms

Driver log while it ran3 of 10 lines

  1. INFO MemoryStore Block broadcast_6 stored as values in memory (estimated size 13.8 KiB, free 1048.1 MiB)
  2. INFO TaskSetManager Finished task 0.0 in stage 4.0 (TID 206) in 236 ms on 10.42.0.197 (executor 1) (1/1)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 242 ms

Attributes

spark.stage.id
4
spark.stage.job_id
2
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
116116 ms
spark.stage.input.bytes_read
0
spark.stage.shuffle.read.bytes_local
236236 B
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
0
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
2929 ms

S3.GetObjectSpark executor

944 calls, 0 marked ERROR, median 7 ms, slowest 140 ms

S3.HeadObjectSpark executor

341 calls, 48 marked ERROR, median 5 ms, slowest 232 ms

S3.ListObjectsV2Spark executor

68 calls, 0 marked ERROR, median 6 ms, slowest 1.2 s

ilum.spark-submitilum-service

starts +0:00, lasts 185 ms, 256 ms with one hot key

ilum.role=apiservice.name=ilum-core

Driver log while it ran

The driver was not running yet.

pod.scheduleddriver pod

starts +0:15, lasts 0 ms, 5 min 54 s with one hot key

ilum.role=k8sservice.name=ilum-k8s-event-otel

Driver log while it ran

The driver was not running yet.

Attributes

k8s.pod.role
driver

pod.runningdriver pod

starts +0:17, lasts 3 min 54 s, 5 min 41 s with one hot key

ilum.role=k8sservice.name=ilum-k8s-event-otel

Driver log while it ran4 of 714 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 5875 ms on 10.42.1.136 (executor 1) (1/64)
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 6050 ms on 10.42.1.136 (executor 1) (2/64)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 72 ms
  4. ERROR Utils Uncaught exception in thread kubernetes-executor-pod-polling-sync

Attributes

k8s.pod.role
driver

spark.applicationSpark driver

starts +0:57, lasts 3 min 11 s, 5 min 24 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran4 of 676 lines

  1. WARN SparkConf Note that spark.local.dir will be overridden by the value set by the cluster manager (via SPARK_LOCAL_DIRS in standalone/kubernetes and LOCAL_DIRS in YARN).
  2. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 5875 ms on 10.42.1.136 (executor 1) (1/64)
  3. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 6050 ms on 10.42.1.136 (executor 1) (2/64)
  4. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 72 ms

pod.runningexecutor pod

starts +1:11, lasts 2 min 58 s, 5 min 19 s with one hot key

ilum.role=k8sservice.name=ilum-k8s-event-otel

Driver log while it ran4 of 628 lines

  1. WARN SparkSession Using an existing Spark session; only runtime SQL configurations will take effect.
  2. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 5875 ms on 10.42.1.136 (executor 1) (1/64)
  3. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 6050 ms on 10.42.1.136 (executor 1) (2/64)
  4. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 72 ms

Attributes

k8s.pod.role
executor

spark.query:merchant_affinity_stagingSpark SQL query

starts +1:39, lasts 2 min 26 s, 4 min 38 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 486 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 5875 ms on 10.42.1.136 (executor 1) (1/64)
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 6050 ms on 10.42.1.136 (executor 1) (2/64)
  3. INFO DAGScheduler ResultStage 2 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 50222 ms

spark.job:0Spark job

starts +1:43, lasts 8.5 s, 16.6 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 194 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 0.0 (TID 1) in 3687 ms on 10.42.1.136 (executor 1) (1/90)
  2. INFO TaskSetManager Finished task 0.0 in stage 0.0 (TID 0) in 3828 ms on 10.42.1.136 (executor 1) (2/90)
  3. INFO DAGScheduler ResultStage 0 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 8356 ms

Attributes

spark.job.id
0

spark.stage:0.0Spark stage

starts +1:43, lasts 8.4 s, 16.5 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

90 tasks, by time

slowest: task 0, 3.8 s, 0 B of shuffle read, 0% of the rows

Driver log while it ran3 of 189 lines

  1. INFO TaskSetManager Finished task 1.0 in stage 0.0 (TID 1) in 3687 ms on 10.42.1.136 (executor 1) (1/90)
  2. INFO TaskSetManager Finished task 0.0 in stage 0.0 (TID 0) in 3828 ms on 10.42.1.136 (executor 1) (2/90)
  3. INFO DAGScheduler ResultStage 0 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 8356 ms

Attributes

spark.stage.id
0
spark.stage.job_id
0
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
89549.0 s
spark.stage.input.bytes_read
0
spark.stage.shuffle.read.bytes_local
0
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
0
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
121121 ms

spark.job:1Spark job

starts +1:53, lasts 1 min 57 s, 4 min 4 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 256 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 5875 ms on 10.42.1.136 (executor 1) (1/64)
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 6050 ms on 10.42.1.136 (executor 1) (2/64)
  3. INFO DAGScheduler ResultStage 2 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 50222 ms

Attributes

spark.job.id
1

spark.stage:1.0Spark stage

starts +1:53, lasts 66.8 s, 1 min 53 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

64 tasks, by time

slowest: task 1, 6.0 s, median 1.9 s

Driver log while it ran3 of 139 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 1.0 (TID 90) in 5875 ms on 10.42.1.136 (executor 1) (1/64)
  2. INFO TaskSetManager Finished task 1.0 in stage 1.0 (TID 91) in 6050 ms on 10.42.1.136 (executor 1) (2/64)
  3. INFO DAGScheduler ShuffleMapStage 1 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 66794 ms

Attributes

spark.stage.id
1
spark.stage.job_id
1
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
1302212 min 10 s
spark.stage.input.bytes_read
90393608.6 MiB
spark.stage.shuffle.read.bytes_local
0
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
762489332727 MiB
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
12761.3 s

spark.stage:2.0Spark stage

starts +3:00, lasts 50.2 s, 2 min 12 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

48 tasks, by time

slowest: task 15, 4.7 s, median 2.0 s

Driver log while it ran3 of 106 lines

  1. INFO TaskSetManager Finished task 15.0 in stage 2.0 (TID 169) in 4655 ms on 10.42.1.136 (executor 1) (18/48)
  2. INFO TaskSetManager Finished task 26.0 in stage 2.0 (TID 180) in 4301 ms on 10.42.1.136 (executor 1) (27/48)
  3. INFO DAGScheduler ResultStage 2 (saveAsTable at NativeMethodAccessorImpl.java:0) finished in 50222 ms

Attributes

spark.stage.id
2
spark.stage.job_id
1
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
9746097.5 s
spark.stage.input.bytes_read
0
spark.stage.shuffle.read.bytes_local
762489332727 MiB
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
0
spark.stage.output.bytes_written
317379790303 MiB
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
60106.0 s

spark.query:AggregateSpark SQL query

starts +4:07, lasts 2.1 s, 2.8 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 60 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 3.0 (TID 202) in 621 ms on 10.42.1.136 (executor 1) (1/4)
  2. INFO TaskSetManager Finished task 1.0 in stage 3.0 (TID 203) in 767 ms on 10.42.1.136 (executor 1) (2/4)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 72 ms

spark.job:2Spark job

starts +4:07, lasts 1.5 s, 2.6 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

Driver log while it ran3 of 42 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 3.0 (TID 202) in 621 ms on 10.42.1.136 (executor 1) (1/4)
  2. INFO TaskSetManager Finished task 1.0 in stage 3.0 (TID 203) in 767 ms on 10.42.1.136 (executor 1) (2/4)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 72 ms

Attributes

spark.job.id
2

spark.stage:3.0Spark stage

starts +4:07, lasts 1.4 s, 2.3 s with one hot key

ilum.role=driverservice.name=ilum-spark-job

4 tasks, by time

slowest: task 1, 767 ms, median 593 ms

Driver log while it ran3 of 20 lines

  1. INFO TaskSetManager Finished task 0.0 in stage 3.0 (TID 202) in 621 ms on 10.42.1.136 (executor 1) (1/4)
  2. INFO TaskSetManager Finished task 1.0 in stage 3.0 (TID 203) in 767 ms on 10.42.1.136 (executor 1) (2/4)
  3. INFO DAGScheduler ShuffleMapStage 3 (count at NativeMethodAccessorImpl.java:0) finished in 1368 ms

Attributes

spark.stage.id
3
spark.stage.job_id
2
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
22892.3 s
spark.stage.input.bytes_read
7004768.4 KiB
spark.stage.shuffle.read.bytes_local
0
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
236236 B
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
2020 ms

spark.stage:4.0Spark stage

starts +4:09, lasts 72 ms, 242 ms with one hot key

ilum.role=driverservice.name=ilum-spark-job

1 tasks, by time

slowest: task 0, 56 ms, median 56 ms

Driver log while it ran3 of 10 lines

  1. INFO MemoryStore Block broadcast_6 stored as values in memory (estimated size 13.8 KiB, free 116.3 MiB)
  2. INFO TaskSetManager Finished task 0.0 in stage 4.0 (TID 206) in 56 ms on 10.42.1.136 (executor 1) (1/1)
  3. INFO DAGScheduler ResultStage 4 (count at NativeMethodAccessorImpl.java:0) finished in 72 ms

Attributes

spark.stage.id
4
spark.stage.job_id
2
spark.stage.attempt_id
0
spark.stage.executor_run_time_ms
2525 ms
spark.stage.input.bytes_read
0
spark.stage.shuffle.read.bytes_local
236236 B
spark.stage.shuffle.read.bytes_remote
0
spark.stage.shuffle.write.bytes_written
0
spark.stage.output.bytes_written
0
spark.stage.spill.disk_bytes
0
spark.stage.jvm_gc_time_ms
0

S3.GetObjectSpark executor

865 calls, 0 marked ERROR, median 3 ms, slowest 154 ms

S3.HeadObjectSpark executor

350 calls, 66 marked ERROR, median 2 ms, slowest 102 ms

S3.ListObjectsV2Spark executor

74 calls, 0 marked ERROR, median 2 ms, slowest 38 ms

How the driver and executors of such a run get their pods, and how a schedule starts the next one: how a Spark job runs on Kubernetes and how Ilum schedules Spark jobs.

Spark runs as jobs, services and schedules.

A job is one Spark application, a service keeps Spark running for the next call, and a schedule starts a new job at every tick of its cron expression.

0:00 / 0:19

Key moments

  1. Filter Spark jobs by cluster and state, then search

    A filter keeps the finished jobs of prod-batch, a search the three runs of card-merchant-affinity.

  2. A finished Spark job opens on its totals

    The slow run opens on its tasks, executors and memory.

  3. The timeline of a run’s Spark jobs and stages

    Timeline lays jobs and stages on one time axis, and a stage shows its duration and output.

  4. Its executors, and the log of every pod

    Executors lists each one with its tasks and peak JVM memory. Logs reads 500 lines of any pod of the run, a limit you can raise.

The Cost tab adds up what one run used, table by table.

The Cost tab adds up what one run used and splits it by the tables it read and wrote, each with a modeled cost from your rate card for comparing runs. FinOps, an Enterprise module, prices whole runs and adds them up by cluster, user and cost center.

0:00 / 0:10

Key moments

  1. Executor CPU time, I/O, shuffle and spill of a run

    It used 15.5 minutes of executor CPU time and spilled 320 MiB to disk. A callout suggests more memory or smaller partitions.

  2. The cost ramp of a run, bucket by bucket

    The ramp draws executor seconds, shuffle read and write and disk spill over the run, here in buckets of 15 seconds.

  3. The cost of each table a run read and wrote

    Each dataset gets its role, executor time, bytes, S3 requests and modeled cost, and the cost flow sizes it by its share of bytes.

Switch it on

Tracing and the Cost tab come with Ilum 6.7.3 and are off by default. The first value deploys the OpenTelemetry collector and Tempo and adds the listeners to every job started after it, the second turns on the cost rollup, and the last three bring Loki and Promtail for the logs under a trace.

helm upgrade ilum ilum/ilum \
  --reuse-values \
  --set global.observability.otel.enabled=true \
  --set global.costAggregator.enabled=true \
  --set global.logAggregation.enabled=true \
  --set global.logAggregation.loki.enabled=true \
  --set global.logAggregation.promtail.enabled=true

Questions and answers

How do I trace a Spark job on Kubernetes with Ilum?

Set global.observability.otel.enabled=true on the Helm release. Ilum then deploys an OpenTelemetry collector and Tempo, and adds its Spark listeners, a Spark plugin and the OpenTelemetry Java agent to every job it starts. Only jobs launched after that are traced.

Which spans does a traced Spark job send?

One for the application, each SQL query, each Spark job and each stage. A stage span carries its executor run time, bytes read, shuffled, written and spilled to disk, and its GC time. ilum-core adds the submit and the life of each pod in Kubernetes, and every call to object storage and to the metastore is a span of its own.

Can I read the logs of one span?

Yes, with Loki and Promtail on. Every pod of a traced run carries its trace id as a label, so the panel under the waterfall reads the lines of the driver, the executors, Kubernetes and Airflow in one query, with a histogram of errors and warnings over time. On a failed span, View logs for this span narrows the panel to that span’s time window.

What does the Cost tab of a Spark job show?

Executor CPU time summed over every executor, bytes in and out, the share of shuffle in the I/O and the spill to disk, with a note when shuffle or spill is high. Under them the cost ramp shows executor seconds, shuffle and spill over the run, and a table lists the datasets the run read and wrote with their executor time, bytes and requests to object storage.

Is the modeled cost of a run a bill?

No. It comes from the rate card of the chart, which starts at 0.049 USD per vCPU-hour and 0.0067 per GB-hour, and is shown only once an operator marks the rate card as configured. It is there to compare runs and tables. FinOps, part of Ilum Enterprise, prices whole runs from the same figures and holds them against budgets.

Contact

Tell us about your cluster.

Name one workload you want to move.

Tell us where it runs today.

We answer with a plan, not a deck.

[email protected]

We reply within two working days.