You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Xiangyu Li <yi...@gmail.com> on 2018/04/05 01:41:35 UTC

Spark uses more threads than specified in local[n]

Hi,

I am running a job in local mode, configured with local[1] for the sake of
the example. The timeline view in Spark UI is as follows:




It shows that there are actually two threads running, though their
overlapping is very small. To validate this, I also added some change to
Spark's task runner that prints `Thread.currentThread().getId()`, and there
indeed prints out two thread ids.

Is this some behavior from Spark's thread pool to improve performance?

-- 
Sincerely
Xiangyu Li

<yi...@gmail.com>